[pypy-svn] r48918 - pypy/dist/pypy/interpreter

arigo at codespeak.net arigo at codespeak.net
Thu Nov 22 10:35:34 CET 2007


Author: arigo
Date: Thu Nov 22 10:35:33 2007
New Revision: 48918

Modified:
   pypy/dist/pypy/interpreter/gateway.py
Log:
Fix for:  "rm -r _cache; py.py"


Modified: pypy/dist/pypy/interpreter/gateway.py
==============================================================================
--- pypy/dist/pypy/interpreter/gateway.py	(original)
+++ pypy/dist/pypy/interpreter/gateway.py	Thu Nov 22 10:35:33 2007
@@ -924,9 +924,10 @@
         cls.seed = md5.new(str(GI_VERSION)).digest()
         if GI_VERSION != GI_VERSION_RENDERED or GI_VERSION is None:
             for pth in p.listdir():
-                try:
-                    pth.remove()
-                except: pass
+                if pth.check(file=1):
+                    try:
+                        pth.remove()
+                    except: pass
             f = file(get_tmp_file_name(str(ini)), "w")
             f.write("""\
 # This folder acts as a cache for code snippets which have been


More information about the pypy-svn mailing list