|
|
31982d5 |
From 67560887db764757bd2ad52ff6bde137984b4f61 Mon Sep 17 00:00:00 2001
|
|
|
31982d5 |
From: lethliel <mstrigl@suse.com>
|
|
|
31982d5 |
Date: Thu, 13 Dec 2018 13:33:51 +0100
|
|
|
31982d5 |
Subject: [PATCH] [python3] enable full python3 support for man
|
|
|
31982d5 |
|
|
|
31982d5 |
---
|
|
|
31982d5 |
osc/cmdln.py | 20 ++++++++++----------
|
|
|
31982d5 |
1 file changed, 10 insertions(+), 10 deletions(-)
|
|
|
31982d5 |
|
|
|
31982d5 |
diff --git a/osc/cmdln.py b/osc/cmdln.py
|
|
|
31982d5 |
index 3d303b09..918a1da1 100644
|
|
|
31982d5 |
--- a/osc/cmdln.py
|
|
|
31982d5 |
+++ b/osc/cmdln.py
|
|
|
31982d5 |
@@ -621,16 +621,16 @@ def do_man(self, argv):
|
|
|
31982d5 |
${name} man
|
|
|
31982d5 |
"""
|
|
|
31982d5 |
mandate = datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
|
|
|
31982d5 |
- self.stdout.write(bytes(
|
|
|
31982d5 |
+ self.stdout.write(
|
|
|
31982d5 |
self.man_header % {
|
|
|
31982d5 |
'date': mandate.strftime('%b %Y'),
|
|
|
31982d5 |
'version': self.get_version(),
|
|
|
31982d5 |
'name': self.name,
|
|
|
31982d5 |
'ucname': self.name.upper()
|
|
|
31982d5 |
- },
|
|
|
31982d5 |
- "utf-8"))
|
|
|
31982d5 |
+ }
|
|
|
31982d5 |
+ )
|
|
|
31982d5 |
|
|
|
31982d5 |
- self.stdout.write(bytes(self.man_commands_header, "utf-8"))
|
|
|
31982d5 |
+ self.stdout.write(self.man_commands_header)
|
|
|
31982d5 |
commands = self._help_get_command_list()
|
|
|
31982d5 |
for command, doc in commands:
|
|
|
31982d5 |
cmdname = command.split(' ')[0]
|
|
|
31982d5 |
@@ -641,14 +641,14 @@ def do_man(self, argv):
|
|
|
31982d5 |
line = line[8:]
|
|
|
31982d5 |
lines.append(man_escape(line))
|
|
|
31982d5 |
|
|
|
31982d5 |
- self.stdout.write(bytes(
|
|
|
31982d5 |
- '.TP\n\\fB%s\\fR\n%s\n' % (command, '\n'.join(lines)), "utf-8"))
|
|
|
31982d5 |
+ self.stdout.write(
|
|
|
31982d5 |
+ '.TP\n\\fB%s\\fR\n%s\n' % (command, '\n'.join(lines)))
|
|
|
31982d5 |
|
|
|
31982d5 |
- self.stdout.write(bytes(self.man_options_header, "utf-8"))
|
|
|
31982d5 |
- self.stdout.write(bytes(
|
|
|
31982d5 |
- man_escape(self._help_preprocess('${option_list}', None)), "utf-8"))
|
|
|
31982d5 |
+ self.stdout.write(self.man_options_header)
|
|
|
31982d5 |
+ self.stdout.write(
|
|
|
31982d5 |
+ man_escape(self._help_preprocess('${option_list}', None)))
|
|
|
31982d5 |
|
|
|
31982d5 |
- self.stdout.write(bytes(self.man_footer, "utf-8"))
|
|
|
31982d5 |
+ self.stdout.write(self.man_footer)
|
|
|
31982d5 |
|
|
|
31982d5 |
self.stdout.flush()
|
|
|
31982d5 |
|