[pypy-svn] r74035 - pypy/trunk/pypy/module/posix/test

arigo at codespeak.net arigo at codespeak.net
Sat Apr 24 17:38:41 CEST 2010


Author: arigo
Date: Sat Apr 24 17:38:39 2010
New Revision: 74035

Modified:
   pypy/trunk/pypy/module/posix/test/test_posix2.py
Log:
Don't crash with an AttributeError if there was a problem running setup().


Modified: pypy/trunk/pypy/module/posix/test/test_posix2.py
==============================================================================
--- pypy/trunk/pypy/module/posix/test/test_posix2.py	(original)
+++ pypy/trunk/pypy/module/posix/test/test_posix2.py	Sat Apr 24 17:38:39 2010
@@ -658,7 +658,10 @@
             space.sys.filesystemencoding = "utf-8"
 
     def teardown_class(cls):
-        cls.space.sys.filesystemencoding = cls.save_fs_encoding
+        try:
+            cls.space.sys.filesystemencoding = cls.save_fs_encoding
+        except AttributeError:
+            pass
 
     def test_stat_unicode(self):
         # test that passing unicode would not raise UnicodeDecodeError



More information about the Pypy-commit mailing list