diff options
author | Ruben Rodriguez <ruben@trisquel.info> | 2015-06-23 10:14:03 -0500 |
---|---|---|
committer | Ruben Rodriguez <ruben@trisquel.info> | 2015-06-26 10:06:44 -0500 |
commit | 44127cdd8e80bded5f4c80072145c6ed30e8fee6 (patch) | |
tree | e86d178b10a70c9a400ebc7b93e76b959fba3812 | |
parent | cd561ea6e01c01f28ca5182a25493b7640eb59a9 (diff) |
Prevent export.py crashing on missing description fields
-rw-r--r-- | export.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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', [ |