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

Unified Diff: runtime/tools/make_version.py

Issue 11085074: Fix make_version.py in cases where we cant get revision info (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tools/make_version.py
===================================================================
--- runtime/tools/make_version.py (revision 13537)
+++ runtime/tools/make_version.py (working copy)
@@ -27,9 +27,15 @@
cmd = ['svn', 'info']
else:
cmd = ['git', 'svn', 'info']
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- return proc.communicate()[0].split('\n')[4].split(' ')[1]
-
+ try:
+ proc = subprocess.Popen(cmd,
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ return proc.communicate()[0].split('\n')[4].split(' ')[1]
+ except Exception:
+ # If we can't get any revision info (due to lack of tooling) return ''.
+ return ''
+
+
def makeVersionString(version_file):
id = platform.system()
if id == 'Windows' or id == 'Microsoft':
« 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