Use global statement instead of importing ourselves to get to global

variable.
This commit is contained in:
Sjoerd Mullender 1995-12-07 10:16:45 +00:00
parent 453ced57dc
commit e5fe4af070
1 changed files with 2 additions and 6 deletions

View File

@ -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.