#257 Make decision about compose for all architectures/variants
Merged by lholecek. Opened by lholecek.
lholecek/greenwave compose-decision-for-all-archs-variants  into  master

Download 257.patch
no initial comment

if result_data.get('system_architecture') is going to be a list this will become: '[]"
Isn't it?

Yeah. I think in most cases the arch_variant will be either ("['BaseOS']", "['x86_64']") or ("None", "None") (this one in case of Fedora compose tests).

But don't you think that format is really not-nice? :\

It's not nice, but I only use it to check whether I already encountered same value.

Assuming that the items are always lists, I could use either one of these:
- next(iter(result_data.get('system_architecture', [])), None)
- ','.join(result_data.get('system_architecture', []))

I like the first one more. The second one will return '' and not None.
Or also I like:
result_data.get('system_architecture', [])[0] if len(result_data.get('system_architecture', [])) else None

But... yeah you are using it only for one check... so I guess all of there are ok

Beside that +1 for me

Commit 7b108793 fixes this pull-request

Pull-Request has been merged by lholecek

Pull-Request has been merged by lholecek

Metadata