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

Unified Diff: tools/auto_bisect/bisect_utils.py

Issue 548233002: Add a module to fetch builds from different types of builders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments. Created 6 years, 3 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 | « no previous file | tools/auto_bisect/cloud_storage_wrapper.py » ('j') | tools/auto_bisect/fetch_build.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/auto_bisect/bisect_utils.py
diff --git a/tools/auto_bisect/bisect_utils.py b/tools/auto_bisect/bisect_utils.py
index 330c4648508f91457200dbd3acbfd29efe0e75d2..f2a9ef6da3d49d4202210f424986985216d28a43 100644
--- a/tools/auto_bisect/bisect_utils.py
+++ b/tools/auto_bisect/bisect_utils.py
@@ -541,11 +541,7 @@ def IsStringFloat(string_to_check):
def IsWindowsHost():
- """Checks whether or not the script is running on Windows.
-
- Returns:
- True if running on Windows.
- """
+ """Checks whether or not the script is running on Windows."""
ojan 2014/09/12 00:36:27 I would remove these comments entirely. They're sa
qyearsley 2014/09/12 03:21:12 Fair enough :-)
return sys.platform == 'cygwin' or sys.platform.startswith('win')
@@ -555,29 +551,18 @@ def Is64BitWindows():
Returns:
True if Windows is 64-bit, False if 32-bit.
"""
- platform = os.environ['PROCESSOR_ARCHITECTURE']
- try:
- platform = os.environ['PROCESSOR_ARCHITEW6432']
- except KeyError:
- # Must not be running in WoW64, so PROCESSOR_ARCHITECTURE is correct
- pass
-
- return platform in ['AMD64', 'I64']
+ platform = os.environ.get('PROCESSOR_ARCHITEW6432')
+ if not platform:
+ # Must not be running in WoW64, so PROCESSOR_ARCHITECTURE is correct.
+ platform = os.environ.get('PROCESSOR_ARCHITECTURE')
+ return platform and platform in ['AMD64', 'I64']
def IsLinuxHost():
- """Checks whether or not the script is running on Linux.
-
- Returns:
- True if running on Linux.
- """
+ """Checks whether or not the script is running on Linux."""
ojan 2014/09/12 00:36:27 Ditto
qyearsley 2014/09/12 03:21:12 Done.
return sys.platform.startswith('linux')
def IsMacHost():
- """Checks whether or not the script is running on Mac.
-
- Returns:
- True if running on Mac.
- """
+ """Checks whether or not the script is running on Mac."""
ojan 2014/09/12 00:36:27 Ditto
qyearsley 2014/09/12 03:21:13 Done.
return sys.platform.startswith('darwin')
« no previous file with comments | « no previous file | tools/auto_bisect/cloud_storage_wrapper.py » ('j') | tools/auto_bisect/fetch_build.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698