diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 13:34:05 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 13:34:05 +0000 |
commit | 0e7594a7d815893de9380147b2cc699db647c099 (patch) | |
tree | ebcf608d3b8dbc467ff05e4832ff0115c43d3a4f | |
parent | dedb324f724794a0fdbb20d10a9a4cb801f475d7 (diff) | |
download | chromium_src-0e7594a7d815893de9380147b2cc699db647c099.zip chromium_src-0e7594a7d815893de9380147b2cc699db647c099.tar.gz chromium_src-0e7594a7d815893de9380147b2cc699db647c099.tar.bz2 |
Correct the way that exceptions are raised in create_installer_archive.py, also display the process exit code when running the compression utility fails.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/6759066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81740 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | chrome/tools/build/win/create_installer_archive.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/tools/build/win/create_installer_archive.py b/chrome/tools/build/win/create_installer_archive.py index b652bcb..7cec0d6 100755 --- a/chrome/tools/build/win/create_installer_archive.py +++ b/chrome/tools/build/win/create_installer_archive.py @@ -194,8 +194,10 @@ def Readconfig(output_dir, input_file, current_version): def RunSystemCommand(cmd): print 'Running [' + cmd + ']' - if (os.system(cmd) != 0): - raise "Error while running cmd: %s" % cmd + exit_code = os.system(cmd) + if (exit_code != 0): + raise Exception("Error while running cmd: %s, exit_code: %s" % + (cmd, exit_code)) def CreateArchiveFile(options, staging_dir, current_version, prev_version): """Creates a new installer archive file after deleting any existing old file. @@ -245,7 +247,8 @@ def PrepareSetupExec(options, staging_dir, current_version, prev_version): setup_file = SETUP_EXEC elif options.setup_exe_format == "DIFF": if not options.last_chrome_installer: - raise "To use DIFF for setup.exe, --last_chrome_installer is needed." + raise Exception( + "To use DIFF for setup.exe, --last_chrome_installer is needed.") prev_setup_file = os.path.join(options.last_chrome_installer, SETUP_EXEC) new_setup_file = os.path.join(options.output_dir, SETUP_EXEC) patch_file = os.path.join(options.output_dir, SETUP_PATCH_FILE_PREFIX + |