From 0b1b249ae8f2005d07d6a3fcc2a1888966bcccf1 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Thu, 14 Nov 2013 19:49:44 +0100 Subject: [PATCH] commands: Remove trailing newline for command errors --- mopidy/utils/command.py | 2 +- tests/utils/command_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mopidy/utils/command.py b/mopidy/utils/command.py index d8b5bbf6..bd2c97e6 100644 --- a/mopidy/utils/command.py +++ b/mopidy/utils/command.py @@ -10,7 +10,7 @@ class CommandError(Exception): self.usage = usage def __str__(self): - return '%s\n\nerror: %s\n' % (self.usage, self.message) + return '%s\n\nerror: %s' % (self.usage, self.message) class ArgumentParser(argparse.ArgumentParser): diff --git a/tests/utils/command_test.py b/tests/utils/command_test.py index 7c2e3112..8017a92c 100644 --- a/tests/utils/command_test.py +++ b/tests/utils/command_test.py @@ -433,7 +433,7 @@ class CommandErrorTest(unittest.TestCase): def test_str_command_error(self): error = command.CommandError('message', usage='usage: foo') - self.assertEqual(str(error), 'usage: foo\n\nerror: message\n') + self.assertEqual(str(error), 'usage: foo\n\nerror: message') class RunTest(unittest.TestCase):