mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use 'U' if file is not present (we run under 3.x)
This commit is contained in:
@@ -64,8 +64,13 @@ except NameError:
|
||||
|
||||
# Universal newline support
|
||||
_textmode = 'r'
|
||||
if hasattr(file, 'newlines'):
|
||||
try:
|
||||
file
|
||||
except NameError:
|
||||
_textmode = 'U'
|
||||
else:
|
||||
if hasattr(file, 'newlines'):
|
||||
_textmode = 'U'
|
||||
|
||||
|
||||
class TreeWalkWarning(Warning):
|
||||
|
||||
Reference in New Issue
Block a user