Index: tko/parsers/version_1.py |
diff --git a/tko/parsers/version_1.py b/tko/parsers/version_1.py |
index 111f7efaf6ade54bcbb98bf648c838be939bf96c..7448c4fd28575083e1a0aee83ce57c37f569c999 100644 |
--- a/tko/parsers/version_1.py |
+++ b/tko/parsers/version_1.py |
@@ -70,11 +70,14 @@ class iteration(models.iteration): |
val_type = "perf" |
# parse the actual value into a dict |
- if val_type == "attr": |
- attr_dict[key] = value |
- elif val_type == "perf" and re.search("^\d+(\.\d+)?$", value): |
- perf_dict[key] = float(value) |
- else: |
+ try: |
+ if val_type == "attr": |
+ attr_dict[key] = value |
+ elif val_type == "perf": |
+ perf_dict[key] = float(value) |
+ else: |
+ raise ValueError |
+ except ValueError: |
msg = ("WARNING: line '%s' found in test " |
"iteration keyval could not be parsed") |
msg %= line |