mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 10:16:14 +01:00
[python3] enable full python3 support for man
This commit is contained in:
parent
7bd9ca485d
commit
67560887db
20
osc/cmdln.py
20
osc/cmdln.py
@ -621,16 +621,16 @@ class RawCmdln(cmd.Cmd):
|
||||
${name} man
|
||||
"""
|
||||
mandate = datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
|
||||
self.stdout.write(bytes(
|
||||
self.stdout.write(
|
||||
self.man_header % {
|
||||
'date': mandate.strftime('%b %Y'),
|
||||
'version': self.get_version(),
|
||||
'name': self.name,
|
||||
'ucname': self.name.upper()
|
||||
},
|
||||
"utf-8"))
|
||||
}
|
||||
)
|
||||
|
||||
self.stdout.write(bytes(self.man_commands_header, "utf-8"))
|
||||
self.stdout.write(self.man_commands_header)
|
||||
commands = self._help_get_command_list()
|
||||
for command, doc in commands:
|
||||
cmdname = command.split(' ')[0]
|
||||
@ -641,14 +641,14 @@ class RawCmdln(cmd.Cmd):
|
||||
line = line[8:]
|
||||
lines.append(man_escape(line))
|
||||
|
||||
self.stdout.write(bytes(
|
||||
'.TP\n\\fB%s\\fR\n%s\n' % (command, '\n'.join(lines)), "utf-8"))
|
||||
self.stdout.write(
|
||||
'.TP\n\\fB%s\\fR\n%s\n' % (command, '\n'.join(lines)))
|
||||
|
||||
self.stdout.write(bytes(self.man_options_header, "utf-8"))
|
||||
self.stdout.write(bytes(
|
||||
man_escape(self._help_preprocess('${option_list}', None)), "utf-8"))
|
||||
self.stdout.write(self.man_options_header)
|
||||
self.stdout.write(
|
||||
man_escape(self._help_preprocess('${option_list}', None)))
|
||||
|
||||
self.stdout.write(bytes(self.man_footer, "utf-8"))
|
||||
self.stdout.write(self.man_footer)
|
||||
|
||||
self.stdout.flush()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user