[Python-checkins] r45628 - sandbox/trunk/setuptools/setuptools/sandbox.py

phillip.eby python-checkins at python.org
Fri Apr 21 19:38:55 CEST 2006


Author: phillip.eby
Date: Fri Apr 21 19:38:55 2006
New Revision: 45628

Modified:
   sandbox/trunk/setuptools/setuptools/sandbox.py
Log:
Recognize 'U' as a valid read-only mode for open()


Modified: sandbox/trunk/setuptools/setuptools/sandbox.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/sandbox.py	(original)
+++ sandbox/trunk/setuptools/setuptools/sandbox.py	Fri Apr 21 19:38:55 2006
@@ -158,7 +158,7 @@
         raise SandboxViolation(operation, args, kw)
 
     def _open(self, path, mode='r', *args, **kw):
-        if mode not in ('r', 'rt', 'rb', 'rU') and not self._ok(path):
+        if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
             self._violation("open", path, mode, *args, **kw)
         return _open(path,mode,*args,**kw)
 


More information about the Python-checkins mailing list