aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@trisquel.info>2015-06-23 10:14:03 -0500
committerRuben Rodriguez <ruben@trisquel.info>2015-06-26 10:06:44 -0500
commit44127cdd8e80bded5f4c80072145c6ed30e8fee6 (patch)
treee86d178b10a70c9a400ebc7b93e76b959fba3812
parentcd561ea6e01c01f28ca5182a25493b7640eb59a9 (diff)
Prevent export.py crashing on missing description fields
-rw-r--r--export.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/export.py b/export.py
index bbea75e..41643a9 100644
--- a/export.py
+++ b/export.py
@@ -242,10 +242,13 @@ def export_srcpkgs(data, name, srcpkg_names):
# We could try to do something smarter, like look for the common
# prefix of the descriptions of all the binary packages.
descpkg = binpkg_names[0]
-
- desc = list(data.descs[
- data.descs['Package'] == descpkg]['Description-en'])[0]
- (short_desc, full_desc) = desc.split('\n', 1)
+ try:
+ desc = list(data.descs[
+ data.descs['Package'] == descpkg]['Description-en'])[0]
+ (short_desc, full_desc) = desc.split('\n', 1)
+ except:
+ full_desc = ''
+ short_desc = ''
full_desc = catechise(munge_description(full_desc))
yield Template('Entry', [