aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-02-28 10:36:55 +0100
committerMichał Górny <mgorny@gentoo.org>2017-02-28 23:07:09 +0100
commit0dc2b065e16f1bec22b1730c2b2faf06e01d10af (patch)
tree85b3a5b9a9e0a25bc47a9cc1358d97961e90e85f /pym/portage/dbapi/vartree.py
parentvartree: Use hashlib lazy-import, kill py<2.5 compat (diff)
downloadportage-0dc2b065e16f1bec22b1730c2b2faf06e01d10af.tar.gz
portage-0dc2b065e16f1bec22b1730c2b2faf06e01d10af.tar.bz2
portage-0dc2b065e16f1bec22b1730c2b2faf06e01d10af.zip
vartree: Replace uses of internal portage.checksum._new_md5 var
Use the public hashlib.md5 method that is required for other code in the module already.
Diffstat (limited to 'pym/portage/dbapi/vartree.py')
-rw-r--r--pym/portage/dbapi/vartree.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 2a612d162..c421dc50b 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -4690,8 +4690,7 @@ class dblink(object):
os.unlink(mysrc)
os.symlink(myto, mysrc)
- mymd5 = portage.checksum._new_md5(
- _unicode_encode(myto)).hexdigest()
+ mymd5 = md5(_unicode_encode(myto)).hexdigest()
protected = False
if stat.S_ISLNK(mymode) or stat.S_ISREG(mymode):
@@ -4725,8 +4724,7 @@ class dblink(object):
# of the link target path string is used
# for cfgfiledict (symlinks are
# protected since bug #485598).
- destmd5 = portage.checksum._new_md5(
- _unicode_encode(mydest_link)).hexdigest()
+ destmd5 = md5(_unicode_encode(mydest_link)).hexdigest()
elif stat.S_ISREG(mydmode):
destmd5 = perform_md5(mydest,