Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: server/autoserv

Issue 6246035: Merge remote branch 'cros/upstream' into master (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: server/autoserv
diff --git a/server/autoserv b/server/autoserv
index 1cec992415a22168d1116ee3ed65b005781e34fc..2c4acb1a30cf7b22a6e507d8efdb1fbaa6bce17a 100755
--- a/server/autoserv
+++ b/server/autoserv
@@ -89,13 +89,11 @@ def run_autoserv(pid_file_manager, results, parser):
# can't be both a client and a server side test
if client and server:
- print "Can not specify a test as both server and client!"
- sys.exit(1)
+ parser.parser.error("Can not specify a test as both server and client!")
if len(parser.args) < 1 and not (verify or repair or cleanup
or collect_crashinfo):
- print parser.parser.print_help()
- sys.exit(1)
+ parser.parser.error("Missing argument: control file")
# We have a control file unless it's just a verify/repair/cleanup job
if len(parser.args) > 0:
@@ -116,15 +114,13 @@ def run_autoserv(pid_file_manager, results, parser):
if machines:
for machine in machines:
if not machine or re.search('\s', machine):
- print "Invalid machine %s" % str(machine)
- sys.exit(1)
+ parser.parser.error("Invalid machine: %s" % str(machine))
machines = list(set(machines))
machines.sort()
if group_name and len(machines) < 2:
- print ("-G %r may only be supplied with more than one machine."
+ parser.parser.error("-G %r may only be supplied with more than one machine."
% group_name)
- sys.exit(1)
kwargs = {'group_name': group_name, 'tag': execution_tag}
if control_filename:
« cli/job.py ('K') | « scheduler/monitor_db.py ('k') | server/autoserv_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698