[py-svn] r7728 - py/dist/py/path
hpk at codespeak.net
hpk at codespeak.net
Thu Dec 2 21:52:43 CET 2004
Author: hpk
Date: Thu Dec 2 21:52:42 2004
New Revision: 7728
Modified:
py/dist/py/path/common.py
Log:
let's be a bit more thorough with universal newline
and accept both 'U' and 'u'.
Modified: py/dist/py/path/common.py
==============================================================================
--- py/dist/py/path/common.py (original)
+++ py/dist/py/path/common.py Thu Dec 2 21:52:42 2004
@@ -249,8 +249,10 @@
def read(self, mode='rb'):
""" read and return a bytestring from reading the path. """
- if 'U' in mode and py.std.sys.version_info < (2,3):
- mode = mode.replace('U', 'r' not in mode and 'r' or '')
+ if py.std.sys.version_info < (2,3):
+ for x in 'u', 'U':
+ if x in mode:
+ mode = mode.replace(x, '')
f = self.open(mode)
try:
return f.read()
More information about the pytest-commit
mailing list