From 16ce915aac7add2650aa539a3f1428da358ee337 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 5 Jun 2018 00:44:23 -0400 Subject: fix export.py error, add example output --- export.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'export.py') 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() - -- cgit v1.2.3