summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2017-03-31 17:11:08 +0100
committerJonathan Maw <jonathan.maw@codethink.co.uk>2017-03-31 17:11:08 +0100
commitfb32b0aaa02d35d99a9dc19c105b12fd088ee4e2 (patch)
tree00ff720bc5fa1166a4c2ed859a19a478283db3bc
parent6ca8b4b1f15ddab610a56248395c2f8950e86c98 (diff)
downloadybd-jonathan/rpm-export-optional-files.tar.gz
rpm: Handle packages without a "files" sectionjonathan/rpm-export-optional-files
-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