From 6938c506bb5cf40829a6048abcdfbf23282f20b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Fri, 8 Sep 2017 20:55:55 +0200 Subject: [PATCH] basecommand: use logger.critical() instead of sys.stderr.write() As a side effect, this fixes the missing trailing line break. --- whipper/command/basecommand.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/whipper/command/basecommand.py b/whipper/command/basecommand.py index e33aa64..379a23b 100644 --- a/whipper/command/basecommand.py +++ b/whipper/command/basecommand.py @@ -93,8 +93,8 @@ class BaseCommand(): self.parser.print_help() sys.exit(0) if not self.options.remainder[0] in self.subcommands: - sys.stderr.write("incorrect subcommand: %s" % - self.options.remainder[0]) + logger.critical("incorrect subcommand: %s", + self.options.remainder[0]) sys.exit(1) self.cmd = self.subcommands[self.options.remainder[0]]( self.options.remainder[1:],