Index: gclient.py |
diff --git a/gclient.py b/gclient.py |
index 5b159edb0442639b8f656ceb2e25b28e3e1a5e9d..3ddc58dc920fdbb6f96bb8e7dff6038b7d4bbfab 100755 |
--- a/gclient.py |
+++ b/gclient.py |
@@ -67,6 +67,7 @@ Specifying a target OS |
__version__ = "0.6.4" |
import copy |
+import hashlib |
import logging |
import optparse |
import os |
@@ -1544,6 +1545,21 @@ def CMDsync(parser, args): |
(options, args) = parser.parse_args(args) |
client = GClient.LoadCurrentConfig(options) |
+ # Print some extra info if we are running on a bot. |
+ if 'CHROME_HEADLESS' in os.environ and os.environ['CHROME_HEADLESS'] == '1': |
+ if 'AWS_CREDENTIAL_FILE' in os.environ: |
+ boto_location = os.environ['AWS_CREDENTIAL_FILE'] |
+ else: |
+ boto_location = os.path.expanduser('~/.boto') |
+ if os.path.exists(boto_location): |
+ with open(boto_location) as f: |
+ boto_hash = hashlib.sha1(f.read()).hexdigest() |
+ else: |
+ boto_hash = 'None' |
+ print '===Bot Info===' |
+ print 'Boto hash: %s' % boto_hash |
+ print '===End Bot Info===' |
+ |
if not client: |
raise gclient_utils.Error('client not configured; see \'gclient config\'') |