mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 10:52:17 +03:00
minor fixing
This commit is contained in:
parent
e14a1a4523
commit
2167a8596f
2 changed files with 3 additions and 3 deletions
|
@ -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))
|
||||||
|
|
||||||
|
|
|
@ -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())
|
||||||
|
|
Loading…
Reference in a new issue