summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordevcurmudgeon <paul.sherwood@codethink.co.uk>2017-04-03 11:26:53 +0000
committerdevcurmudgeon <paul.sherwood@codethink.co.uk>2017-04-03 11:26:53 +0000
commitacd6b99221a6e900212c3fa43a53addbc12b99fc (patch)
tree00ff720bc5fa1166a4c2ed859a19a478283db3bc
parent6ca8b4b1f15ddab610a56248395c2f8950e86c98 (diff)
parentfb32b0aaa02d35d99a9dc19c105b12fd088ee4e2 (diff)
downloadybd-acd6b99221a6e900212c3fa43a53addbc12b99fc.tar.gz
Merge branch 'jonathan/rpm-export-optional-files' into 'tristan/rpm-export'
rpm: Handle packages without a "files" section See merge request !332
-rw-r--r--ybd/rpm.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ybd/rpm.py b/ybd/rpm.py
index f85f566..1543e43 100644
--- a/ybd/rpm.py
+++ b/ybd/rpm.py
@@ -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