[pypy-commit] lang-smalltalk default: catch exception on os.fstat

timfel noreply at buildbot.pypy.org
Wed Dec 18 17:06:23 CET 2013


Author: Tim Felgentreff <timfelgentreff at gmail.com>
Branch: 
Changeset: r536:552c99b5e77c
Date: 2013-12-18 13:58 +0100
http://bitbucket.org/pypy/lang-smalltalk/changeset/552c99b5e77c/

Log:	catch exception on os.fstat

diff --git a/spyvm/plugins/fileplugin.py b/spyvm/plugins/fileplugin.py
--- a/spyvm/plugins/fileplugin.py
+++ b/spyvm/plugins/fileplugin.py
@@ -40,7 +40,10 @@
         file_path = os.path.join(full_path, py_name)
     except OSError:
         raise PrimitiveFailedError
-    file_info = os.stat(file_path)
+    try:
+        file_info = os.stat(file_path)
+    except OSError:
+        raise PrimitiveFailedError
 
     w_name = space.wrap_string(py_name)
     w_creationTime = smalltalk_timestamp(space, file_info.st_ctime)


More information about the pypy-commit mailing list