From 92d3779dffa35e6c648741b89408ccb60bd59551 Mon Sep 17 00:00:00 2001 From: Chris Sosa Date: Mon, 19 Jul 2010 11:12:20 -0700 Subject: [PATCH] Return error when error occurs by raising exception Review URL: http://codereview.chromium.org/2819052 --- cros_mark_as_stable.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cros_mark_as_stable.py b/cros_mark_as_stable.py index dd3192cb50..df87985a9a 100755 --- a/cros_mark_as_stable.py +++ b/cros_mark_as_stable.py @@ -315,9 +315,9 @@ def main(argv): except gflags.FlagsError, e : _PrintUsageAndDie(str(e)) - package_list = gflags.FLAGS.packages.split(' ') + package_list = gflags.FLAGS.packages.split() if gflags.FLAGS.commit_ids: - commit_id_list = gflags.FLAGS.commit_ids.split(' ') + commit_id_list = gflags.FLAGS.commit_ids.split() else: commit_id_list = None _CheckSaneArguments(package_list, commit_id_list, command) @@ -347,11 +347,12 @@ def main(argv): worker.CommitChange(_GIT_COMMIT_MESSAGE % (package, commit_id)) except (OSError, IOError), e: - print ('An exception occurred %s\n' + print ('An exception occurred\n' 'Only the following packages were revved: %s\n' 'Note you will have to go into %s' 'and reset the git repo yourself.' % - (e, package_list[:index], _CHROMIUMOS_OVERLAYS_DIRECTORY)) + (package_list[:index], _CHROMIUMOS_OVERLAYS_DIRECTORY)) + raise e elif command == 'push': _PushChange()