mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Remove unnecessary code
This commit is contained in:
parent
bade03c824
commit
79a958b867
@ -21,12 +21,9 @@ class path(str):
|
|||||||
Represents a path which behaves like a string.
|
Represents a path which behaves like a string.
|
||||||
"""
|
"""
|
||||||
if sys.version_info < (3, 0):
|
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 isinstance(s, unicode):
|
||||||
if errors is None:
|
s = s.encode(encoding, errors=errors)
|
||||||
s = s.encode(encoding)
|
|
||||||
else:
|
|
||||||
s = s.encode(encoding, errors=errors)
|
|
||||||
return str.__new__(cls, s)
|
return str.__new__(cls, s)
|
||||||
return str.__new__(cls, s)
|
return str.__new__(cls, s)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user