'Return hash of configuration file'

def get_cfg_hash(self):

    if (not self.cfg_loc):
        return None
    with open(self.cfg_loc) as fap:
        data = fap.read()
    if six.PY3:
        data = data.encode('utf-8')
    file_hash = hashlib.md5(data).hexdigest()
    return file_hash
