mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
only decode if possible
This commit is contained in:
@@ -630,6 +630,8 @@ class BuildEnvironment:
|
||||
|
||||
class SphinxSourceClass(FileInput):
|
||||
def decode(self_, data):
|
||||
if isinstance(data, unicode):
|
||||
return data
|
||||
return data.decode(self_.encoding, 'sphinx')
|
||||
|
||||
def read(self_):
|
||||
|
||||
Reference in New Issue
Block a user