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

Side by Side Diff: tools/python/google/path_utils.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/logging_utils.py ('k') | tools/python/google/platform_utils.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 4
5 """Some utility methods for getting and manipulating paths.""" 5 """Some utility methods for getting and manipulating paths."""
6 6
7 # TODO(pamg): Have the buildbot use these, too. 7 # TODO(pamg): Have the buildbot use these, too.
8 8
9 9
10 import errno 10 import errno
11 import os 11 import os
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 def MaybeMakeDirectory(*path): 76 def MaybeMakeDirectory(*path):
77 """Creates an entire path, if it doesn't already exist.""" 77 """Creates an entire path, if it doesn't already exist."""
78 file_path = os.path.join(*path) 78 file_path = os.path.join(*path)
79 try: 79 try:
80 os.makedirs(file_path) 80 os.makedirs(file_path)
81 except OSError, e: 81 except OSError, e:
82 # errno.EEXIST is "File exists". If we see another error, re-raise. 82 # errno.EEXIST is "File exists". If we see another error, re-raise.
83 if e.errno != errno.EEXIST: 83 if e.errno != errno.EEXIST:
84 raise 84 raise
85
OLDNEW
« no previous file with comments | « tools/python/google/logging_utils.py ('k') | tools/python/google/platform_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698