Diff of /trunk/py2exe/zipextimporter.py [r727] .. [r728] Maximize Restore

  Switch to side-by-side view

--- a/trunk/py2exe/zipextimporter.py
+++ b/trunk/py2exe/zipextimporter.py
@@ -64,9 +64,10 @@
         return None
 
     def load_module(self, fullname):
+        verbose = _memimporter.get_verbose_flag()
         if sys.modules.has_key(fullname):
             mod = sys.modules[fullname]
-            if _memimporter.get_verbose_flag():
+            if verbose:
                 sys.stderr.write("import %s # previously loaded from zipfile %s\n" % (fullname, self.archive))
             return mod
         try:
@@ -83,12 +84,12 @@
         for s in suffixes:
             path = filename + s
             if path in self._files:
-                if _memimporter.get_verbose_flag():
+                if verbose:
                     sys.stderr.write("# found %s in zipfile %s\n" % (path, self.archive))
                 mod = _memimporter.import_module(fullname, path, initname, self.get_data)
                 mod.__file__ = "%s\\%s" % (self.archive, path)
                 mod.__loader__ = self
-                if _memimporter.get_verbose_flag():
+                if verbose:
                     sys.stderr.write("import %s # loaded from zipfile %s\n" % (fullname, mod.__file__))
                 return mod
         raise zipimport.ZipImportError, "can't find module %s" % fullname