summaryrefslogtreecommitdiff
path: root/tests/path.py
diff options
context:
space:
mode:
authorDaniel Neuhäuser <ich@danielneuhaeuser.de>2010-06-12 20:21:14 +0200
committerDaniel Neuhäuser <ich@danielneuhaeuser.de>2010-06-12 20:21:14 +0200
commit79a958b867c2941d68fbb9bd594a1c26f511003c (patch)
tree85ae7839e7ed5046a2c3b22bc1258d35421044e3 /tests/path.py
parentbade03c8243cbdf7296126c3a1c54bccccc354ed (diff)
downloadsphinx-git-79a958b867c2941d68fbb9bd594a1c26f511003c.tar.gz
Remove unnecessary code
Diffstat (limited to 'tests/path.py')
-rw-r--r--tests/path.py7
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)