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

Side by Side Diff: build/util/lastchange.py

Issue 6610013: Added check for None missed in recent commit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ 6 """
7 lastchange.py -- Chromium revision fetching utility. 7 lastchange.py -- Chromium revision fetching utility.
8 """ 8 """
9 9
10 import re 10 import re
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 Errors are swallowed. 109 Errors are swallowed.
110 110
111 Returns: 111 Returns:
112 whether git-svn has been set up. 112 whether git-svn has been set up.
113 """ 113 """
114 # To test whether git-svn has been set up, query the config for any 114 # To test whether git-svn has been set up, query the config for any
115 # svn-related configuration. This command exits with an error code 115 # svn-related configuration. This command exits with an error code
116 # if there aren't any matches, so ignore its output. 116 # if there aren't any matches, so ignore its output.
117 proc = RunGitCommand(directory, ['config', '--get-regexp', '^svn']) 117 proc = RunGitCommand(directory, ['config', '--get-regexp', '^svn'])
118 return (proc.wait() == 0) 118 if proc:
119 return (proc.wait() == 0)
120 return false
fta 2011/03/03 12:54:40 must be "False" instead
119 121
120 122
121 def FetchGitSVNURL(directory): 123 def FetchGitSVNURL(directory):
122 """ 124 """
123 Fetch URL of SVN repository bound to git. 125 Fetch URL of SVN repository bound to git.
124 126
125 Errors are swallowed. 127 Errors are swallowed.
126 128
127 Returns: 129 Returns:
128 SVN URL. 130 SVN URL.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if out_file: 251 if out_file:
250 WriteIfChanged(out_file, contents) 252 WriteIfChanged(out_file, contents)
251 else: 253 else:
252 sys.stdout.write(contents) 254 sys.stdout.write(contents)
253 255
254 return 0 256 return 0
255 257
256 258
257 if __name__ == '__main__': 259 if __name__ == '__main__':
258 sys.exit(main()) 260 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698