Python3 fix for hashing in inventory plugins
This commit is contained in:
parent
84eea2a7e3
commit
99a30f8fdb
1 changed files with 2 additions and 2 deletions
|
@ -61,11 +61,11 @@ class BaseInventoryPlugin(object):
|
|||
''' create predictable unique prefix for plugin/inventory '''
|
||||
|
||||
m = hashlib.sha1()
|
||||
m.update(self.NAME)
|
||||
m.update(to_bytes(self.NAME))
|
||||
d1 = m.hexdigest()
|
||||
|
||||
n = hashlib.sha1()
|
||||
n.update(path)
|
||||
n.update(to_bytes(path))
|
||||
d2 = n.hexdigest()
|
||||
|
||||
return 's_'.join([d1[:5], d2[:5]])
|
||||
|
|
Loading…
Reference in a new issue