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') |