diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2017-03-31 17:11:08 +0100 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2017-03-31 17:11:08 +0100 |
commit | fb32b0aaa02d35d99a9dc19c105b12fd088ee4e2 (patch) | |
tree | 00ff720bc5fa1166a4c2ed859a19a478283db3bc | |
parent | 6ca8b4b1f15ddab610a56248395c2f8950e86c98 (diff) | |
download | ybd-jonathan/rpm-export-optional-files.tar.gz |
rpm: Handle packages without a "files" sectionjonathan/rpm-export-optional-files
-rw-r--r-- | ybd/rpm.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -161,8 +161,8 @@ def generate_spec(dn, stage_dir, metafile, output, name, time, system): output_f.write(package[cmd]['body'] + '\n') output_f.write('\n') - # Some packages implicitly exist, but don't have any files. - if type(package['files']) is not list: + # Skip writing files if nonexistent/empty + if type(package.get('files')) is not list: continue # Sub-Package files |