Kaydet (Commit) e5fe4af0 authored tarafından Sjoerd Mullender's avatar Sjoerd Mullender

Use global statement instead of importing ourselves to get to global

variable.
üst 453ced57
...@@ -22,14 +22,10 @@ def stat(path): ...@@ -22,14 +22,10 @@ def stat(path):
# Reset the cache completely. # Reset the cache completely.
# Hack: to reset a global variable, we import this module.
# #
def reset(): def reset():
import statcache global cache
# Check that we really imported the same module cache = {}
if cache is not statcache.cache:
raise 'sorry, statcache identity crisis'
statcache.cache = {}
# Remove a given item from the cache, if it exists. # Remove a given item from the cache, if it exists.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment