diff --git a/osc/cmdln.py b/osc/cmdln.py index 3d303b09..918a1da1 100644 --- a/osc/cmdln.py +++ b/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()