diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 578: Fix bug #1163661 - "Not able to map float value to measurement field".

Message ID 20130408050019.8401.86793.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Senthil Kumaran April 8, 2013, 5 a.m. UTC
------------------------------------------------------------
revno: 578
committer: Senthil Kumaran <senthil.kumaran@linaro.org>
branch nick: trunk
timestamp: Mon 2013-04-08 10:27:50 +0530
message:
  Fix bug #1163661 - "Not able to map float value to measurement field". 
modified:
  lava_dispatcher/lava_test_shell.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/lava_test_shell.py'
--- lava_dispatcher/lava_test_shell.py	2013-04-05 09:27:07 +0000
+++ lava_dispatcher/lava_test_shell.py	2013-04-08 04:57:50 +0000
@@ -239,6 +239,13 @@ 
                     continue
             res['log_lineno'] = lineno
             res['log_filename'] = 'stdout.log'
+            if 'measurement' in res:
+                try:
+                    res['measurement'] = decimal.Decimal(res['measurement'])
+                except decimal.InvalidOperation:
+                    logging.warning("Invalid measurement %s" % (
+                            res['measurement']))
+                    del res['measurement']
             results_from_log_file.append(res)
 
     results_from_directories = []