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

Side by Side Diff: gclient_utils.py

Issue 213006: gclient: fix PyChecker errors caused by r26423 (Closed)
Patch Set: fix PyChecker bugs due to r26423 Created 11 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 unified diff | Download patch
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2009 Google Inc. All Rights Reserved. 1 # Copyright 2009 Google Inc. All Rights Reserved.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and 12 # See the License for the specific language governing permissions and
13 # limitations under the License. 13 # limitations under the License.
14 14
15 import errno
15 import os 16 import os
16 import stat 17 import stat
17 import subprocess 18 import subprocess
18 import sys 19 import sys
20 import time
19 import xml.dom.minidom 21 import xml.dom.minidom
22 import xml.parsers.expat
20 23
21 ## Generic utils 24 ## Generic utils
22 25
23 26
24 def ParseXML(output): 27 def ParseXML(output):
25 try: 28 try:
26 return xml.dom.minidom.parseString(output) 29 return xml.dom.minidom.parseString(output)
27 except xml.parsers.expat.ExpatError: 30 except xml.parsers.expat.ExpatError:
28 return None 31 return None
29 32
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 raise Error(msg) 234 raise Error(msg)
232 235
233 236
234 def IsUsingGit(root, paths): 237 def IsUsingGit(root, paths):
235 """Returns True if we're using git to manage any of our checkouts. 238 """Returns True if we're using git to manage any of our checkouts.
236 |entries| is a list of paths to check.""" 239 |entries| is a list of paths to check."""
237 for path in paths: 240 for path in paths:
238 if os.path.exists(os.path.join(root, path, '.git')): 241 if os.path.exists(os.path.join(root, path, '.git')):
239 return True 242 return True
240 return False 243 return False
OLDNEW
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698