diff options
| author | Ingo Molnar <mingo@kernel.org> | 2017-09-04 11:01:18 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2017-09-04 11:01:18 +0200 |
| commit | edc2988c548db05e33b921fed15821010bc74895 (patch) | |
| tree | b35860428acea35e5866d4cf007519ed943a85de /Documentation/sphinx/kerneldoc.py | |
| parent | d82fed75294229abc9d757f08a4817febae6c4f4 (diff) | |
| parent | 81a84ad3cb5711cec79f4dd53a4ce026b092c432 (diff) | |
| download | blackbird-op-linux-edc2988c548db05e33b921fed15821010bc74895.tar.gz blackbird-op-linux-edc2988c548db05e33b921fed15821010bc74895.zip | |
Merge branch 'linus' into locking/core, to fix up conflicts
Conflicts:
mm/page_alloc.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'Documentation/sphinx/kerneldoc.py')
| -rw-r--r-- | Documentation/sphinx/kerneldoc.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py index d15e07f36881..39aa9e8697cc 100644 --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -27,6 +27,7 @@ # Please make sure this works on both python2 and python3. # +import codecs import os import subprocess import sys @@ -88,13 +89,10 @@ class KernelDocDirective(Directive): try: env.app.verbose('calling kernel-doc \'%s\'' % (" ".join(cmd))) - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() - # python2 needs conversion to unicode. - # python3 with universal_newlines=True returns strings. - if sys.version_info.major < 3: - out, err = unicode(out, 'utf-8'), unicode(err, 'utf-8') + out, err = codecs.decode(out, 'utf-8'), codecs.decode(err, 'utf-8') if p.returncode != 0: sys.stderr.write(err) |

