diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 577: Convert version to a string if found in testdef metadata.

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

Commit Message

Senthil Kumaran April 8, 2013, 3 a.m. UTC
------------------------------------------------------------
revno: 577
committer: Senthil Kumaran <senthil.kumaran@linaro.org>
branch nick: trunk
timestamp: Mon 2013-04-08 01:13:05 +0530
message:
  Convert version to a string if found in testdef metadata.
modified:
  lava_dispatcher/actions/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/actions/lava_test_shell.py'
--- lava_dispatcher/actions/lava_test_shell.py	2013-04-07 10:53:18 +0000
+++ lava_dispatcher/actions/lava_test_shell.py	2013-04-07 19:43:05 +0000
@@ -204,9 +204,10 @@ 
 
 def _get_testdef_info(testdef):
     metadata = {'os': '', 'devices': '', 'environment': ''}
-    metadata['description'] = testdef['metadata'].get('description', None)
-    metadata['format'] = testdef['metadata'].get('format', None)
-    metadata['version'] = testdef['metadata'].get('version', None)
+    metadata['description'] = testdef['metadata'].get('description')
+    metadata['format'] = testdef['metadata'].get('format')
+    version = testdef['metadata'].get('version')
+    metadata['version'] = version and str(version) or version
 
     # Convert list to comma separated string.
     if testdef['metadata'].get('os'):