projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce21973
)
python: make the DictImporter's unload() work in any context.
author
Nathan Binkert
<nate@binkert.org>
Mon, 13 Aug 2007 20:39:22 +0000
(13:39 -0700)
committer
Nathan Binkert
<nate@binkert.org>
Mon, 13 Aug 2007 20:39:22 +0000
(13:39 -0700)
import sys since sys may not be defined in whatever context the DictImporter
is used. Also reset self.installed after an unload since the same DictImporter
could be used again
--HG--
extra : convert_revision :
988ed7ad8cd41b69e8fc583e618b1b4a146216da
src/python/generate.py
patch
|
blob
|
history
diff --git
a/src/python/generate.py
b/src/python/generate.py
index 6b167552e5dc0e9f5f9c7e09b63f6ad39ea570da..7c6ca1c5e668f31248a40ae31d384518eae0eb37 100644
(file)
--- a/
src/python/generate.py
+++ b/
src/python/generate.py
@@
-46,8
+46,10
@@
class DictImporter(object):
self.unload()
def unload(self):
+ import sys
for module in self.installed:
del sys.modules[module]
+ self.installed = set()
def find_module(self, fullname, path):
if fullname == '__scons':