[Python-checkins] cpython: Clear packaging.database caches in place

eric.araujo python-checkins at python.org
Fri Jul 15 17:54:59 CEST 2011


http://hg.python.org/cpython/rev/935b49a08295
changeset:   71340:935b49a08295
user:        Éric Araujo <merwok at netwok.org>
date:        Fri Jul 15 17:47:46 2011 +0200
summary:
  Clear packaging.database caches in place

files:
  Lib/packaging/database.py |  11 +++++------
  1 files changed, 5 insertions(+), 6 deletions(-)


diff --git a/Lib/packaging/database.py b/Lib/packaging/database.py
--- a/Lib/packaging/database.py
+++ b/Lib/packaging/database.py
@@ -61,13 +61,12 @@
 
 def clear_cache():
     """ Clears the internal cache. """
-    global _cache_name, _cache_name_egg, _cache_path, _cache_path_egg, \
-        _cache_generated, _cache_generated_egg
+    global _cache_generated, _cache_generated_egg
 
-    _cache_name = {}
-    _cache_name_egg = {}
-    _cache_path = {}
-    _cache_path_egg = {}
+    _cache_name.clear()
+    _cache_name_egg.clear()
+    _cache_path.clear()
+    _cache_path_egg.clear()
     _cache_generated = False
     _cache_generated_egg = False
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list