[pypy-svn] r21607 - pypy/dist/pypy/tool
pedronis at codespeak.net
pedronis at codespeak.net
Fri Dec 30 18:21:11 CET 2005
Author: pedronis
Date: Fri Dec 30 18:21:10 2005
New Revision: 21607
Modified:
pypy/dist/pypy/tool/isolate.py
Log:
fixed bug close->_close.
Modified: pypy/dist/pypy/tool/isolate.py
==============================================================================
--- pypy/dist/pypy/tool/isolate.py (original)
+++ pypy/dist/pypy/tool/isolate.py Fri Dec 30 18:21:10 2005
@@ -10,7 +10,7 @@
mod = __import__(mod, {}, {}, ['__doc__'])
else:
dir, name = mod
- file, pathname, description = imp.find_module(name, [str(dir)])
+ file, pathname, description = imp.find_module(name, [dir])
try:
mod = imp.load_module(name, file, pathname, description)
finally:
@@ -54,6 +54,7 @@
module: a dotted module name or a tuple (directory, module-name)
"""
+ _closed = False
def __init__(self, module):
self.gw = py.execnet.PopenGateway()
@@ -77,11 +78,13 @@
raise IsolateException, "%s.%s" % value
def _close(self):
- self.chan.close()
- self.gw.exit()
+ if not self._closed:
+ self.chan.close()
+ self.gw.exit()
+ self._closed = True
def __del__(self):
- self.close()
+ self._close()
def close_isolate(isolate):
assert isinstance(isolate, Isolate)
More information about the Pypy-commit
mailing list