Skip to content

Commit d91d1a2

Browse files
committed
'1a1b1c'.decode('hex') is now …
… bytes.fromhex('1a1b1c'); conveniently, already bytes for b64encode()
1 parent 6c4b6e6 commit d91d1a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hubblestack/extmods/fileserver/azurefs.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ def update():
252252
if os.path.exists(fname):
253253
# File exists, check the hashes
254254
source_md5 = blob.properties.content_settings.content_md5
255-
local_md5 = base64.b64encode(salt.utils.hashutils.get_hash(fname, 'md5').decode('hex'))
255+
local_md5_hex = salt.utils.hashutils.get_hash(fname, 'md5')
256+
local_md5 = base64.b64encode(bytes.fromhex(local_md5_hex))
256257
if local_md5 != source_md5:
257258
update = True
258259
else:

0 commit comments

Comments
 (0)