Index: cros_mark_as_stable.py |
diff --git a/cros_mark_as_stable.py b/cros_mark_as_stable.py |
index 9a3ab5221ccd69cd72296f89411ac98c389d3665..bbc4713f45dc7dd4c1ff419d0083a4d7f4f33a0e 100755 |
--- a/cros_mark_as_stable.py |
+++ b/cros_mark_as_stable.py |
@@ -240,7 +240,11 @@ def _SimpleRunCommand(command): |
"""Runs a shell command and returns stdout back to caller.""" |
_Print(' + %s' % command) |
proc_handle = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True) |
- return proc_handle.communicate()[0] |
+ stdout = proc_handle.communicate()[0] |
+ retcode = proc_handle.wait() |
+ if retcode != 0: |
+ Die("Non-zero return code (%s) for command: %s" % (retcode, command)) |
sosa
2010/11/03 23:49:06
Can you throw an exception instead.
|
+ return stdout |
# ======================= End Global Helper Functions ======================== |
@@ -480,11 +484,16 @@ def main(argv): |
except gflags.FlagsError, e : |
_PrintUsageAndDie(str(e)) |
- package_list = gflags.FLAGS.packages.split() |
+ package_list = gflags.FLAGS.packages.split(':') |
_CheckSaneArguments(package_list, command) |
if gflags.FLAGS.overlays: |
- overlays = dict((path, []) for path in gflags.FLAGS.overlays.split()) |
+ overlays = {} |
+ for path in gflags.FLAGS.overlays.split(':'): |
+ if not os.path.exists(path): |
+ Die('Cannot find overlay: %s' % path) |
+ overlays[path] = [] |
else: |
+ Warning('Missing --overlays argument') |
overlays = { |
'%s/private-overlays/chromeos-overlay' % gflags.FLAGS.srcroot: [], |
'%s/third_party/chromiumos-overlay' % gflags.FLAGS.srcroot: [] |