[entropy.spm] convert string to bytes before passing it to hashlib objects

This commit is contained in:
Fabio Erculiani
2013-05-27 22:19:03 +02:00
parent b71cea2ed5
commit 90f5b6e686

View File

@@ -1060,8 +1060,8 @@ class PortagePlugin(SpmPlugin):
# the timestamp (md5 hashed) as part of the filename
cur_t = time.time()
m = hashlib.md5()
m.update(repr(cur_t))
m.update(repr(package))
m.update(const_convert_to_rawstring(cur_t))
m.update(const_convert_to_rawstring(package))
debug_file_save_path = file_save_name + "." + m.hexdigest() + \
etpConst['packagesdebugext']
debug_tmp_fd, debug_tmp_file = const_mkstemp(