mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 05:51:43 +01:00
Return error when error occurs by raising exception
Review URL: http://codereview.chromium.org/2819052
This commit is contained in:
parent
90f689c2d3
commit
92d3779dff
@ -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()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user