In general, I like the fact that we are getting the diff smaller and
smaller. :-)
Follows another round of comments, which is basically one issue really:
the issue of default values - I think it should be `None`, and would
like your opinion.
minor nitpick: shouldn't this closing brace align with testdef_metadata (i.e. one
indent level to the left)?
Main point here is: why are you using an empty string as default values,
instead of `None`? Isn't `None` the appropriate value in case no data
was provided? Shouldn't we s/''/None/ in the above hunk?
Hi Senthil,
In general, I like the fact that we are getting the diff smaller and
smaller. :-)
Follows another round of comments, which is basically one issue really:
the issue of default values - I think it should be `None`, and would
like your opinion.
review needs-info
> === modified file 'lava_dispatche r/actions/ lava_test_ shell.py' /actions/ lava_test_ shell.py 2013-02-11 02:31:22 +0000 /actions/ lava_test_ shell.py 2013-04-02 01:15:27 +0000 info(testdef) : 'metadata' ].get(' version' )) 'description' ] = str(testdef[ 'metadata' ].get(' description' )) 'metadata' ].get(' format' )) 'description' ] = testdef[ 'metadata' ].get(' description' , '') 'metadata' ].get(' format' , '') 'metadata' ].get(' version' , '') 'metadata' ].get(' os'): testdef[ 'metadata' ].get(' os')) testdef[ 'metadata' ].get(' os', '')) 'metadata' ].get(' devices' ): testdef[ 'metadata' ].get(' devices' )) testdef[ 'metadata' ].get(' devices' , '')) 'metadata' ].get(' environment' ): 'environment' ] = ','.join( 'metadata' ].get(' environment' )) 'metadata' ].get(' environment' , ''))
> --- lava_dispatcher
> +++ lava_dispatcher
> @@ -204,20 +204,20 @@
>
> def _get_testdef_
> metadata = {'os': '', 'devices': '', 'environment': ''}
> - metadata['version'] = str(testdef[
> - metadata[
> - metadata['format'] = str(testdef[
> + metadata[
> + metadata['format'] = testdef[
> + metadata['version'] = testdef[
>
> # Convert list to comma separated string.
> if testdef[
> - metadata['os'] = ','.join(
> + metadata['os'] = ','.join(
>
> if testdef[
> - metadata['devices'] = ','.join(
> + metadata['devices'] = ','.join(
>
> if testdef[
> metadata[
> - testdef[
> + testdef[
So you changed from using `"None"` to using an empty string as the
default. Why are we doing this? Is this the expected behavior?
If you agree with me that None is indeed the appropriate default here, I
think you should just undo the diff lines above.
> === modified file 'lava_dispatche r/lava_ test_shell. py' /lava_test_ shell.py 2013-02-11 02:31:22 +0000 /lava_test_ shell.py 2013-04-02 01:15:27 +0000 testdef_ metadata( test_run_ dir):
> --- lava_dispatcher
> +++ lava_dispatcher
> @@ -284,6 +284,25 @@
> return attachments
>
>
> +def _get_run_
> + testdef_metadata = {
> + 'version': '',
> + 'description': '',
> + 'format': '',
> + 'location': '',
> + 'url': '',
> + 'os': '',
> + 'devices': '',
> + 'environment': ''
> + }
minor nitpick: shouldn't this closing brace align with testdef_metadata (i.e. one
indent level to the left)?
Main point here is: why are you using an empty string as default values,
instead of `None`? Isn't `None` the appropriate value in case no data
was provided? Shouldn't we s/''/None/ in the above hunk?
-- www.linaro. org
Antonio Terceiro
Software Engineer - Linaro
http://