Short circuit the loop as soon as missing hashes are detected.
authorZac Medico <zmedico@gentoo.org>
Tue, 26 Jun 2007 22:38:17 +0000 (22:38 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 26 Jun 2007 22:38:17 +0000 (22:38 -0000)
svn path=/main/trunk/; revision=7044

pym/portage/manifest.py

index 5add55c81ab5d62e987231c1e24f0f69f404545f..61af21d94f898b2b2bc1f21233592d9d91edece4 100644 (file)
@@ -487,12 +487,12 @@ class Manifest(object):
                        except OSError:
                                pass
                        if f in distfilehashes and \
+                               not required_hash_types.difference(distfilehashes[f]) and \
                                ((assumeDistHashesSometimes and mystat is None) or \
                                (assumeDistHashesAlways and mystat is None) or \
                                (assumeDistHashesAlways and mystat is not None and \
                                len(distfilehashes[f]) == len(self.hashes) and \
-                               distfilehashes[f]["size"] == mystat.st_size)) and \
-                               not required_hash_types.difference(distfilehashes[f]):
+                               distfilehashes[f]["size"] == mystat.st_size)):
                                self.fhashdict["DIST"][f] = distfilehashes[f]
                        else:
                                try: