| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Utilities for PyAuto.""" | 7 """Utilities for PyAuto.""" |
| 8 | 8 |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 def GetCurrentPlatform(): | 126 def GetCurrentPlatform(): |
| 127 """Get a string representation for the current platform. | 127 """Get a string representation for the current platform. |
| 128 | 128 |
| 129 Returns: | 129 Returns: |
| 130 'mac', 'win' or 'linux' | 130 'mac', 'win' or 'linux' |
| 131 """ | 131 """ |
| 132 if sys.platform == 'darwin': | 132 if sys.platform == 'darwin': |
| 133 return 'mac' | 133 return 'mac' |
| 134 if sys.platform == 'win32': | 134 if sys.platform == 'win32': |
| 135 return 'win' | 135 return 'win' |
| 136 if sys.platform == 'linux2': | 136 if sys.platform.startswith('linux'): |
| 137 return 'linux' | 137 return 'linux' |
| 138 raise RuntimeError('Unknown platform') | 138 raise RuntimeError('Unknown platform') |
| 139 | 139 |
| OLD | NEW |