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

Unified Diff: client/isolateserver.py

Issue 1932143003: run_isolated: support non-isolated commands (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@run-isolated-download-stats
Patch Set: 80cols Created 4 years, 8 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
« no previous file with comments | « client/isolate.py ('k') | client/run_isolated.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/isolateserver.py
diff --git a/client/isolateserver.py b/client/isolateserver.py
index 33f93ccca56c4b31bd8ae5e0bb40ded404c20049..7a861eabc5c583608a9c612912a176f702c5326a 100755
--- a/client/isolateserver.py
+++ b/client/isolateserver.py
@@ -5,7 +5,7 @@
"""Archives a set of files or directories to an Isolate Server."""
-__version__ = '0.4.7'
+__version__ = '0.4.8'
import base64
import functools
@@ -2082,7 +2082,7 @@ def CMDarchive(parser, args):
add_isolate_server_options(parser)
add_archive_options(parser)
options, files = parser.parse_args(args)
- process_isolate_server_options(parser, options, True)
+ process_isolate_server_options(parser, options, True, True)
try:
archive(options.isolate_server, options.namespace, files, options.blacklist)
except Error as e:
@@ -2112,7 +2112,7 @@ def CMDdownload(parser, args):
if args:
parser.error('Unsupported arguments: %s' % args)
- process_isolate_server_options(parser, options, True)
+ process_isolate_server_options(parser, options, True, True)
if bool(options.isolated) == bool(options.file):
parser.error('Use one of --isolated or --file, and only one.')
@@ -2180,13 +2180,17 @@ def add_isolate_server_options(parser):
help='The namespace to use on the Isolate Server, default: %default')
-def process_isolate_server_options(parser, options, set_exception_handler):
- """Processes the --isolate-server option and aborts if not specified.
+def process_isolate_server_options(
+ parser, options, set_exception_handler, required):
+ """Processes the --isolate-server option.
Returns the identity as determined by the server.
"""
if not options.isolate_server:
- parser.error('--isolate-server is required.')
+ if required:
+ parser.error('--isolate-server is required.')
+ return
+
try:
options.isolate_server = net.fix_url(options.isolate_server)
except ValueError as e:
« no previous file with comments | « client/isolate.py ('k') | client/run_isolated.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698