aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDafydd Harries <daf@rhydd.org>2013-03-18 18:54:45 -0400
committerDafydd Harries <daf@rhydd.org>2013-03-18 18:54:45 -0400
commit51d82cb78c436a17ef1ffcf6ba4638183fad765a (patch)
tree5e25c6928324a421b14822fc639fe21a52c2f966
parent800dfb6c174473e11f65a6fc7d4cdfea2f41f2f1 (diff)
handle Files stanzas with no Copyright field
-rw-r--r--export.py3
1 files changed, 2 insertions, 1 deletions
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')