Chromium Code Reviews| Index: tools/bots/bot_utils.py |
| diff --git a/tools/bots/bot_utils.py b/tools/bots/bot_utils.py |
| index d0974e6682f8da8295715da51c495c741a686aca..33ddca089e99f4af29616b8a6a0704f5ecfe47cc 100644 |
| --- a/tools/bots/bot_utils.py |
| +++ b/tools/bots/bot_utils.py |
| @@ -7,6 +7,7 @@ |
| import hashlib |
| import imp |
| import os |
| +import platform |
| import string |
| import subprocess |
| import sys |
| @@ -14,12 +15,6 @@ import sys |
| DART_DIR = os.path.abspath( |
| os.path.normpath(os.path.join(__file__, '..', '..', '..'))) |
| -def GetUtils(): |
| - '''Dynamically load the tools/utils.py python module.''' |
| - return imp.load_source('utils', os.path.join(DART_DIR, 'tools', 'utils.py')) |
| - |
| -utils = GetUtils() |
|
ricow1
2014/05/15 13:28:38
you can't do this, this is used in many of the oth
Bill Hesse
2014/05/15 13:57:03
OK, I only tested this one. So I'll leave the fun
|
| - |
| SYSTEM_RENAMES = { |
| 'win32': 'windows', |
| 'windows': 'windows', |
| @@ -222,7 +217,9 @@ class GSUtil(object): |
| def _layzCalculateGSUtilPath(self): |
| if not GSUtil.GSUTIL_PATH: |
| - buildbot_gsutil = utils.GetBuildbotGSUtilPath() |
| + buildbot_gsutil = '/b/build/scripts/slave/gsutil' |
| + if platform.system() == 'Windows': |
| + buildbot_gsutil = 'e:\\\\b\\build\\scripts\\slave\\gsutil' |
| if os.path.isfile(buildbot_gsutil) and not GSUtil.USE_DART_REPO_VERSION: |
| GSUtil.GSUTIL_IS_SHELL_SCRIPT = True |
| GSUtil.GSUTIL_PATH = buildbot_gsutil |
| @@ -250,12 +247,14 @@ class GSUtil(object): |
| env = dict(os.environ) |
| # If we're on the buildbot, we use a specific boto file. |
| - if utils.GetUserName() == 'chrome-bot': |
| + user_name = os.environ.get( |
| + 'USERNAME' if sys.platform == 'win32' else 'USER', '') |
| + if user_name == 'chrome-bot': |
| boto_config = { |
| - 'linux': '/mnt/data/b/build/site_config/.boto', |
| - 'macos': '/Volumes/data/b/build/site_config/.boto', |
| - 'win32': r'e:\b\build\site_config\.boto', |
| - }[utils.GuessOS()] |
| + 'Linux': '/mnt/data/b/build/site_config/.boto', |
| + 'Darwin': '/Volumes/data/b/build/site_config/.boto', |
| + 'Windows': r'e:\b\build\site_config\.boto', |
| + }[platform.system()] |
| env['AWS_CREDENTIAL_FILE'] = boto_config |
| env['BOTO_CONFIG'] = boto_config |