diff options
author | Daniel Neuhäuser <ich@danielneuhaeuser.de> | 2010-06-12 20:21:14 +0200 |
---|---|---|
committer | Daniel Neuhäuser <ich@danielneuhaeuser.de> | 2010-06-12 20:21:14 +0200 |
commit | 79a958b867c2941d68fbb9bd594a1c26f511003c (patch) | |
tree | 85ae7839e7ed5046a2c3b22bc1258d35421044e3 /tests/path.py | |
parent | bade03c8243cbdf7296126c3a1c54bccccc354ed (diff) | |
download | sphinx-git-79a958b867c2941d68fbb9bd594a1c26f511003c.tar.gz |
Remove unnecessary code
Diffstat (limited to 'tests/path.py')
-rw-r--r-- | tests/path.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/path.py b/tests/path.py index dccdac3ab..28a8c22af 100644 --- a/tests/path.py +++ b/tests/path.py @@ -21,12 +21,9 @@ class path(str): Represents a path which behaves like a string. """ if sys.version_info < (3, 0): - def __new__(cls, s, encoding=FILESYSTEMENCODING, errors=None): + def __new__(cls, s, encoding=FILESYSTEMENCODING, errors='strict'): if isinstance(s, unicode): - if errors is None: - s = s.encode(encoding) - else: - s = s.encode(encoding, errors=errors) + s = s.encode(encoding, errors=errors) return str.__new__(cls, s) return str.__new__(cls, s) |