[pypy-svn] r33476 - pypy/dist/pypy/translator/cli

antocuni at codespeak.net antocuni at codespeak.net
Thu Oct 19 20:06:39 CEST 2006


Author: antocuni
Date: Thu Oct 19 20:06:39 2006
New Revision: 33476

Modified:
   pypy/dist/pypy/translator/cli/rte.py
Log:
(antocuni, cfbolz)

Change the current directory back when finished.



Modified: pypy/dist/pypy/translator/cli/rte.py
==============================================================================
--- pypy/dist/pypy/translator/cli/rte.py	(original)
+++ pypy/dist/pypy/translator/cli/rte.py	Thu Oct 19 20:06:39 2006
@@ -51,6 +51,7 @@
 
     def compile(cls, sources, out):
         log.red("Compiling %s" % (cls.ALIAS or cls.OUTPUT))
+        oldcwd = os.getcwd()
         os.chdir(SRC_DIR)
         compiler = subprocess.Popen([cls.COMPILER] + cls.FLAGS + ['/out:%s' % out] + sources,
                                     stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -60,6 +61,7 @@
         if cls.ALIAS is not None:
             alias = _filename(cls.ALIAS)
             shutil.copy(out, alias)
+        os.chdir(oldcwd)
 
     compile = classmethod(compile)
 



More information about the Pypy-commit mailing list