Merge lp://qastaging/~rsalveti/linaro-image-tools/check-argument-before-use-boot-files into lp://qastaging/linaro-image-tools/11.11

Proposed by Ricardo Salveti
Status: Merged
Merged at revision: 553
Proposed branch: lp://qastaging/~rsalveti/linaro-image-tools/check-argument-before-use-boot-files
Merge into: lp://qastaging/linaro-image-tools/11.11
Diff against target: 44 lines (+18/-13)
1 file modified
linaro_image_tools/media_create/boards.py (+18/-13)
To merge this branch: bzr merge lp://qastaging/~rsalveti/linaro-image-tools/check-argument-before-use-boot-files
Reviewer Review Type Date Requested Status
Deepti B. Kalakeri (community) Approve
Fathi Boudra Pending
Review via email: mp+121356@code.qastaging.launchpad.net

Description of the change

Make sure we first check the argument value before trying to use it with os.path.

By default the arguments not available at the hwpack are all set to None, so it'll not work properly in case you match it with a string.

This change is needed to make linaro-media-create to work again with hwpacks that doesn't provide a dtb file.

To post a comment you must log in.
Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :

>> if not cls.initrd or not initrd
We could make the above comparison and similar ones look better by using
if not (cls.initrd and initrd): ??

Overall looks good. I tested the changes with the hwpacks given in the bug https://bugs.launchpad.net/linaro-image-tools/+bug/1042011 and it seems to resolve the problem.
Can you give me links to hwpacks which contains the dtb files in it?

review: Needs Information
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

For me I find easier to read "if not cls.vmlinuz or not kernel" instead of "if not (cls.initrd and initrd), that's why I coded it this way.

You can check with leb-origen and lt-panda, both contain a valid device tree file.

Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches