minor fixing

This commit is contained in:
Volkan Şahin 2016-08-01 20:07:37 +03:00
parent e14a1a4523
commit 2167a8596f
2 changed files with 3 additions and 3 deletions

View file

@ -46,7 +46,7 @@ class Registration:
j = json.loads(reg_reply) j = json.loads(reg_reply)
self.logger.debug('[Registration]' + j['message']) self.logger.debug('[Registration]' + j['message'])
status = str(j['status']).lower() status = str(j['status']).lower()
dn = str(j['agentDn']).lower() dn = str(j['agentDn'])
self.logger.debug('[Registration] Registration status: ' + str(status)) self.logger.debug('[Registration] Registration status: ' + str(status))

View file

@ -240,9 +240,9 @@ class Util:
return False return False
@staticmethod @staticmethod
def get_md5_file(fname): def get_md5_file(file_path):
hash_md5 = hashlib.md5() hash_md5 = hashlib.md5()
with open(fname, 'rb') as f: with open(file_path, 'rb') as f:
for chunk in iter(lambda: f.read(4096), b""): for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk) hash_md5.update(chunk)
return str(hash_md5.hexdigest()) return str(hash_md5.hexdigest())