Commits

ta...@MacZiade.local  committed 06cf9ae

minor changes after PEP 376 rewrite

  • Participants
  • Parent commits 0430fd0

Comments (0)

Files changed (1)

                 location = join(self.info_path, location)
             yield location, md5, size
 
-    def uses(self, path, local=False):
-        """Returns True is the path is listed in the RECORD file.
+    def uses(self, path):
+        """Returns True if the path is listed in the RECORD file.
 
         e.g. if the project uses this file.
         """
+        local = os.path.exists(path)
         for location, md5, size in self.get_installed_files(local):
             if location == path:
                 return True
         return False
 
-    def owns(self, path, local=False):
+    def owns(self, path):
         """Returns True is the path is listed in the RECORD file and nowhere
         else.
 
             return False
 
         for egg_info in get_egg_infos():
-            if egg_info is not self and egg_info.uses(path, local):
+            if egg_info is not self and egg_info.uses(path):
                 return False
 
         return True
     global _CACHE_ENABLED
     _CACHE_ENABLED = True
 
+def cache_enabled():
+    return _CACHE_ENABLED
+
 #
 # .egg-info finders
 #
 # helper for the uninstall feature
 #
 
-def get_file_users(path, local=False):
+def get_file_users(path):
     """Iterates over all projects to find out which project uses the file.
 
     Return EggInfo instances.
     """
     for egg_info in get_egg_infos():
-        if egg_info.uses(path, local):
+        if egg_info.uses(path):
             yield egg_info