1. Tarek Ziadé
  2. distribute

Commits

phillip.eby  committed 7287d5f

Recognize 'U' as a valid read-only mode for open()

Comments (0)

Files changed (1)

File setuptools/sandbox.py Modified

View file
  • Ignore whitespace
  • Hide word diff
         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)