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

Unified Diff: native_client_sdk/src/tools/getos.py

Issue 502883002: NaCl SDK: Fixed getos.py crashing due to Git migration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: native_client_sdk/src/tools/getos.py
diff --git a/native_client_sdk/src/tools/getos.py b/native_client_sdk/src/tools/getos.py
index c4e31c3188834a40b95db0cff49a0f19af9d7f1d..62c2b5b7632043f2f4f600404729792acf948036 100755
--- a/native_client_sdk/src/tools/getos.py
+++ b/native_client_sdk/src/tools/getos.py
@@ -80,7 +80,6 @@ def GetSDKVersion():
raise Error("error parsing SDK README: %s" % readme)
try:
- revision = int(revision)
version = int(version)
except ValueError:
raise Error("error parsing SDK README: %s" % readme)
@@ -233,10 +232,14 @@ def main(args):
elif options.check_version:
required_version = ParseVersion(options.check_version)
version = GetSDKVersion()
- if version < required_version:
- raise Error("SDK version too old (current: %s.%s, required: %s.%s)"
- % (version[0], version[1],
- required_version[0], required_version[1]))
+ # We currently ignore the revision and just check the major version number.
+ # Currently, version[1] is just a Git hash, which cannot be compared.
+ # TODO(mgiuca): Compare the minor revision numbers (which should be
+ # Cr-Commit-Position values), when http://crbug.com/406783 is fixed.
+ # Then Cr-Commit-Position should be available: see http://crbug.com/406993.
+ if version[0] < required_version[0]:
+ raise Error("SDK version too old (current: %s, required: %s)"
+ % (version[0], required_version[0]))
out = None
if out:
« 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