Chromium Code Reviews| Index: download_from_google_storage.py |
| =================================================================== |
| --- download_from_google_storage.py (revision 238894) |
| +++ download_from_google_storage.py (working copy) |
| @@ -32,6 +32,14 @@ |
| pass |
| +def GetNormalizedPlatform(): |
| + """Returns the result of sys.platform accounting for cygwin. |
| + Under cygwin, this will always return "win32" like the native Python.""" |
| + if sys.platform == "cygwin": |
|
M-A Ruel
2013/12/05 14:37:58
prefer single quotes to double quotes for strings.
|
| + return "win32" |
| + return sys.platform |
| + |
| + |
| # Common utilities |
| class Gsutil(object): |
| """Call gsutil with some predefined settings. This is a convenience object, |
| @@ -317,7 +325,7 @@ |
| # Make sure we should run at all based on platform matching. |
| if options.platform: |
| - if not re.match(options.platform, sys.platform): |
| + if not re.match(options.platform, GetNormalizedPlatform()): |
| if options.verbose: |
| print('The current platform doesn\'t match "%s", skipping.' % |
| options.platform) |