Skip to content

Commit 72b5be0

Browse files
authored
Merge pull request #817 from jettero/4.0-azure-py3-fix
4.0 azure py3 fix and forward port of PR811
2 parents 408bc56 + d91d1a2 commit 72b5be0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-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:

hubblestack/utils/stdrec.py

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ def update_payload(payload):
116116
payload['event'] = dict()
117117
if isinstance(payload['event'], dict):
118118
payload['event'].update(std_info())
119+
if not payload.get('host'):
120+
payload['host'] = get_fqdn()
119121
fields = index_extracted(payload)
120122
if fields:
121123
payload['fields'] = fields

0 commit comments

Comments
 (0)