mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 19:32:34 +01:00
Remove Python 2 support
Python 2 is long dead and devlib does not support it anymore, so cleanup old Python 2-only code.
This commit is contained in:
committed by
Marc Bonnici
parent
28b78a93f1
commit
6fe4bce68d
@@ -73,11 +73,8 @@ class ShowCommand(Command):
|
||||
|
||||
if which('pandoc'):
|
||||
p = Popen(['pandoc', '-f', 'rst', '-t', 'man'], stdin=PIPE, stdout=PIPE, stderr=PIPE)
|
||||
if sys.version_info[0] == 3:
|
||||
output, _ = p.communicate(rst_output.encode(sys.stdin.encoding))
|
||||
output = output.decode(sys.stdout.encoding)
|
||||
else:
|
||||
output, _ = p.communicate(rst_output)
|
||||
output, _ = p.communicate(rst_output.encode(sys.stdin.encoding))
|
||||
output = output.decode(sys.stdout.encoding)
|
||||
|
||||
# Make sure to double escape back slashes
|
||||
output = output.replace('\\', '\\\\\\')
|
||||
|
Reference in New Issue
Block a user