Remove unnecessary code

This commit is contained in:
Daniel Neuhäuser 2010-06-12 20:21:14 +02:00
parent bade03c824
commit 79a958b867

View File

@ -21,11 +21,8 @@ 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)
return str.__new__(cls, s)
return str.__new__(cls, s)