aboutsummaryrefslogtreecommitdiff
path: root/export.py
diff options
context:
space:
mode:
authorIan Kelling <iank@fsf.org>2018-06-05 00:44:23 -0400
committerIan Kelling <iank@fsf.org>2018-06-05 00:44:23 -0400
commit16ce915aac7add2650aa539a3f1428da358ee337 (patch)
tree2dbed69c59625f823a1dcd0d9e6a404d81128dac /export.py
parentbf52ba26d47054ed0619eb4f67f5f167f39ad5f8 (diff)
fix export.py error, add example output
Diffstat (limited to 'export.py')
-rw-r--r--export.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/export.py b/export.py
index d0221cd..bf45e5e 100644
--- a/export.py
+++ b/export.py
@@ -294,7 +294,11 @@ def export_srcpkgs(data, name, srcpkg_names):
res.extend(list(extract_resources(pkg_cps)))
pkg_cl = data.cl[data.cl['_srcpkg'] == srcpkg]
- cl_date = pkg_cl['date'][0]
+ cl_date = pkg_cl['date']
+ # avoid rare bad index error:
+ if cl_date.empty:
+ continue
+ cl_date = cl_date[0]
cl_uploader = pkg_cl['author'][0]
for template in srcpkg_extract_licenses(
pkg_cps, pkg_cpf, pkg_licenses, cl_date, cl_uploader):
@@ -413,4 +417,3 @@ def main():
if __name__ == '__main__':
main()
-