Repository: aurora Updated Branches: refs/heads/master 27b5e25c5 -> 9634d25d2
Remove often-redundant "Error executing command" prefix from client output. Bugs closed: AURORA-1310 Reviewed at https://reviews.apache.org/r/33962/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/9634d25d Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/9634d25d Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/9634d25d Branch: refs/heads/master Commit: 9634d25d22848395d596b9af9ac77cf233de337d Parents: 27b5e25 Author: Bill Farner <[email protected]> Authored: Thu May 7 17:23:11 2015 -0700 Committer: Bill Farner <[email protected]> Committed: Thu May 7 17:23:11 2015 -0700 ---------------------------------------------------------------------- src/main/python/apache/aurora/client/cli/__init__.py | 2 +- src/main/python/apache/aurora/client/cli/update.py | 2 +- src/test/python/apache/aurora/client/cli/test_create.py | 2 +- src/test/python/apache/aurora/client/cli/test_kill.py | 2 +- src/test/python/apache/aurora/client/cli/test_supdate.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/9634d25d/src/main/python/apache/aurora/client/cli/__init__.py ---------------------------------------------------------------------- diff --git a/src/main/python/apache/aurora/client/cli/__init__.py b/src/main/python/apache/aurora/client/cli/__init__.py index 1208846..c1c5454 100644 --- a/src/main/python/apache/aurora/client/cli/__init__.py +++ b/src/main/python/apache/aurora/client/cli/__init__.py @@ -317,7 +317,7 @@ class CommandLine(AbstractClass): except Context.CommandErrorLogged as c: return c.code except Context.CommandError as c: - context.print_err("Error executing command: %s" % c.msg) + context.print_err(c.msg) return c.code except AuroraClientAPI.Error as e: # TODO(wfarner): Generalize this error type in the contract of noun and verb implementations. http://git-wip-us.apache.org/repos/asf/aurora/blob/9634d25d/src/main/python/apache/aurora/client/cli/update.py ---------------------------------------------------------------------- diff --git a/src/main/python/apache/aurora/client/cli/update.py b/src/main/python/apache/aurora/client/cli/update.py index 8296db5..7bd1eb5 100644 --- a/src/main/python/apache/aurora/client/cli/update.py +++ b/src/main/python/apache/aurora/client/cli/update.py @@ -65,7 +65,7 @@ class UpdateController(object): else: raise self.context.CommandError( EXIT_API_ERROR, - "scheduler returned multiple active updates for this job.") + "The scheduler returned multiple active updates for this job.") else: return None http://git-wip-us.apache.org/repos/asf/aurora/blob/9634d25d/src/test/python/apache/aurora/client/cli/test_create.py ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/client/cli/test_create.py b/src/test/python/apache/aurora/client/cli/test_create.py index 4de0ecb..9f32ca3 100644 --- a/src/test/python/apache/aurora/client/cli/test_create.py +++ b/src/test/python/apache/aurora/client/cli/test_create.py @@ -404,7 +404,7 @@ class TestClientCreateCommand(AuroraClientCommandTest): assert result == EXIT_INVALID_CONFIGURATION assert mock_context.get_out() == [] assert mock_context.get_err() == [ - "Error executing command: Error loading configuration: " + "Error loading configuration: " "TypeCheck(FAILED): MesosJob[update_config] failed: " "UpdateConfig[batch_size] failed: u'{{TEST_BATCH}}' not an integer"] http://git-wip-us.apache.org/repos/asf/aurora/blob/9634d25d/src/test/python/apache/aurora/client/cli/test_kill.py ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/client/cli/test_kill.py b/src/test/python/apache/aurora/client/cli/test_kill.py index 09734a7..d6dde5f 100644 --- a/src/test/python/apache/aurora/client/cli/test_kill.py +++ b/src/test/python/apache/aurora/client/cli/test_kill.py @@ -434,4 +434,4 @@ class TestClientKillCommand(AuroraClientCommandTest): assert mock_context.get_err() == [ 'Instances [0, 2, 4, 5, 6] were not killed in time', 'Instances [7, 8, 9, 10, 11] were not killed in time', - 'Error executing command: Exceeded maximum number of errors while killing instances'] + 'Exceeded maximum number of errors while killing instances'] http://git-wip-us.apache.org/repos/asf/aurora/blob/9634d25d/src/test/python/apache/aurora/client/cli/test_supdate.py ---------------------------------------------------------------------- diff --git a/src/test/python/apache/aurora/client/cli/test_supdate.py b/src/test/python/apache/aurora/client/cli/test_supdate.py index 6fb1f71..968d456 100644 --- a/src/test/python/apache/aurora/client/cli/test_supdate.py +++ b/src/test/python/apache/aurora/client/cli/test_supdate.py @@ -368,7 +368,7 @@ class TestAbortUpdate(AuroraClientCommandTest): with pytest.raises(Context.CommandError) as error: self._command.execute(self._fake_context) assert error.message == ( - 'Error executing command: scheduler returned multiple active updates for this job.') + 'scheduler returned multiple active updates for this job.') assert self._mock_api.query_job_updates.mock_calls == [ call(update_statuses=ACTIVE_JOB_UPDATE_STATES, job_key=self.TEST_JOBKEY)]
