Switch swarming.py to use the new client API, add flags, print more info.
- Rename --deadline to --expiration.
- Add --user, --io-timeout, --hard-timeout and --tags.
- The switch to the new API will permit to get rid of the old client API on the
server.
- Print url in "swarming.py trigger" for easier copy-paste, in addition to the
copy-pasteable command. Useful when looking at the logs in a web browser.
- Fix swarming_smoke_test.py which regressed since 4566ecf76b.
R=vadimsh@chromium.org
BUG=swarming:118
Review URL: https://codereview.appspot.com/145020044
diff --git a/auth.py b/auth.py
index e7e7014..917c186 100755
--- a/auth.py
+++ b/auth.py
@@ -89,7 +89,7 @@
on bots.
"""
if net.get_auth_method() not in ('cookie', 'oauth'):
- return
+ return None
server_url = server_url.lower().rstrip('/')
assert server_url.startswith(('https://', 'http://localhost:')), server_url
service = AuthService(server_url)
@@ -102,6 +102,7 @@
sys.exit(1)
email = identity.split(':')[1]
logging.info('Logged in to %s: %s', server_url, email)
+ return email
@subcommand.usage('[options]')