From e5fe4af070bb5251304f30f1381f521de3c655bf Mon Sep 17 00:00:00 2001
From: Sjoerd Mullender <sjoerd@acm.org>
Date: Thu, 7 Dec 1995 10:16:45 +0000
Subject: Use global statement instead of importing ourselves to get to global
 variable.

---
 Lib/statcache.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'Lib/statcache.py')

diff --git a/Lib/statcache.py b/Lib/statcache.py
index 04381f3861..770aef0662 100644
--- a/Lib/statcache.py
+++ b/Lib/statcache.py
@@ -22,14 +22,10 @@ def stat(path):
 
 
 # Reset the cache completely.
-# Hack: to reset a global variable, we import this module.
 #
 def reset():
-	import statcache
-	# Check that we really imported the same module
-	if cache is not statcache.cache:
-		raise 'sorry, statcache identity crisis'
-	statcache.cache = {}
+	global cache
+	cache = {}
 
 
 # Remove a given item from the cache, if it exists.
-- 
cgit v1.2.1