From 51d82cb78c436a17ef1ffcf6ba4638183fad765a Mon Sep 17 00:00:00 2001 From: Dafydd Harries Date: Mon, 18 Mar 2013 18:54:45 -0400 Subject: handle Files stanzas with no Copyright field --- export.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/export.py b/export.py index 7fd7a0e..4bcf4f5 100644 --- a/export.py +++ b/export.py @@ -111,9 +111,10 @@ def srcpkg_extract_licenses(header, filess): txt = lname canon = lmap.get(lname.lower(), 'Other') + # XXX: Should maybe bail if there's no copyright field. cp = ''.join( u'© %s\n' % line - for line in files['Copyright'].splitlines()) + for line in files.dropna().get('Copyright', '').splitlines()) cp = cp.encode('utf8') txt = txt.encode('utf8') -- cgit v1.2.3