From 44127cdd8e80bded5f4c80072145c6ed30e8fee6 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Tue, 23 Jun 2015 10:14:03 -0500 Subject: Prevent export.py crashing on missing description fields --- export.py | 11 +++++++---- 1 file 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', [ -- cgit v1.2.3