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

Side by Side Diff: tools/python/google/platform_utils_win.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/python/google/platform_utils_mac.py ('k') | tools/site_compare/command_line.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 """Platform-specific utility methods shared by several scripts.""" 4 """Platform-specific utility methods shared by several scripts."""
5 5
6 import os 6 import os
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 10
11 import google.path_utils 11 import google.path_utils
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 "C:\b\slave\webkit-release-kjs\build\third_party\cygwin\bin" are converted to 185 "C:\b\slave\webkit-release-kjs\build\third_party\cygwin\bin" are converted to
186 plain "/usr/bin". To avoid this, we do the conversion manually. 186 plain "/usr/bin". To avoid this, we do the conversion manually.
187 187
188 The path is expected to be an absolute path, on any drive. 188 The path is expected to be an absolute path, on any drive.
189 """ 189 """
190 drive_regexp = re.compile(r'([a-z]):[/\\]', re.IGNORECASE) 190 drive_regexp = re.compile(r'([a-z]):[/\\]', re.IGNORECASE)
191 def LowerDrive(matchobj): 191 def LowerDrive(matchobj):
192 return '/cygdrive/%s/' % matchobj.group(1).lower() 192 return '/cygdrive/%s/' % matchobj.group(1).lower()
193 path = drive_regexp.sub(LowerDrive, path) 193 path = drive_regexp.sub(LowerDrive, path)
194 return path.replace('\\', '/') 194 return path.replace('\\', '/')
195
OLDNEW
« no previous file with comments | « tools/python/google/platform_utils_mac.py ('k') | tools/site_compare/command_line.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698