diff options
author | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2018-01-03 12:18:03 +0100 |
---|---|---|
committer | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2018-01-08 12:56:40 +0000 |
commit | 38cb767c7294fbd3aed125fcd88becf698a9ac88 (patch) | |
tree | 7672f38aa9492e1efa002834d45774e4212ef951 /sources/pyside2/doc/pysideinclude.py | |
parent | fbb90fbf357f5632b3c87c8766e6d56c48f6a45a (diff) |
pysideinclude.py: Fix reading included files
Doc: 'make apidoc' fails while reading lines from a qml file (Python 3).
Apparently, the python code that reads the rsts and the corresponding
snippet qml files, uses a stream reader that needs a byte stream and not
a decoded string. Otherwise, the build fails with the following error:
TypeError: can't concat str to bytes
Task-number: PYSIDE-363
Change-Id: I84f97f2be37f9e81bca312013b49fad3a7d984c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside2/doc/pysideinclude.py')
-rw-r--r-- | sources/pyside2/doc/pysideinclude.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/pyside2/doc/pysideinclude.py b/sources/pyside2/doc/pysideinclude.py index f57717622..91fffe115 100644 --- a/sources/pyside2/doc/pysideinclude.py +++ b/sources/pyside2/doc/pysideinclude.py @@ -67,7 +67,7 @@ class PySideInclude(Directive): encoding = self.options.get('encoding', env.config.source_encoding) codec_info = codecs.lookup(encoding) try: - f = codecs.StreamReaderWriter(open(fn, 'U'), + f = codecs.StreamReaderWriter(open(fn, 'Ub'), codec_info[2], codec_info[3], 'strict') lines = f.readlines() f.close() |