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

Unified Diff: tko/parsers/version_1.py

Issue 6124004: Revert "Merge remote branch 'cros/upstream' into autotest-rebase" (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Created 9 years, 11 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 | « tko/job_serializer_unittest.py ('k') | tko/parsers/version_1_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tko/parsers/version_1.py
diff --git a/tko/parsers/version_1.py b/tko/parsers/version_1.py
index 7448c4fd28575083e1a0aee83ce57c37f569c999..111f7efaf6ade54bcbb98bf648c838be939bf96c 100644
--- a/tko/parsers/version_1.py
+++ b/tko/parsers/version_1.py
@@ -70,14 +70,11 @@ class iteration(models.iteration):
val_type = "perf"
# parse the actual value into a dict
- try:
- if val_type == "attr":
- attr_dict[key] = value
- elif val_type == "perf":
- perf_dict[key] = float(value)
- else:
- raise ValueError
- except ValueError:
+ if val_type == "attr":
+ attr_dict[key] = value
+ elif val_type == "perf" and re.search("^\d+(\.\d+)?$", value):
+ perf_dict[key] = float(value)
+ else:
msg = ("WARNING: line '%s' found in test "
"iteration keyval could not be parsed")
msg %= line
« no previous file with comments | « tko/job_serializer_unittest.py ('k') | tko/parsers/version_1_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698