The pycrypto override used the same variables as actual hash functions
before determining whether its functions are useful. As a result, if
pycrypto had a broken module and no hash function was generated,
the possible previous implementation was replaced by None.
---
 pym/portage/checksum.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py
index a46b820af..fc38417a7 100644
--- a/pym/portage/checksum.py
+++ b/pym/portage/checksum.py
@@ -105,14 +105,14 @@ except ImportError:
 # is broken somehow.
 try:
        from Crypto.Hash import SHA256, RIPEMD
-       sha256hash = getattr(SHA256, 'new', None)
-       if sha256hash is not None:
+       sha256hash_ = getattr(SHA256, 'new', None)
+       if sha256hash_ is not None:
                sha256hash = _generate_hash_function("SHA256",
-                       sha256hash, origin="pycrypto")
-       rmd160hash = getattr(RIPEMD, 'new', None)
-       if rmd160hash is not None:
+                       sha256hash_, origin="pycrypto")
+       rmd160hash_ = getattr(RIPEMD, 'new', None)
+       if rmd160hash_ is not None:
                rmd160hash = _generate_hash_function("RMD160",
-                       rmd160hash, origin="pycrypto")
+                       rmd160hash_, origin="pycrypto")
 except ImportError:
        pass
 
-- 
2.12.0


Reply via email to