diff options
author | Bryan Gardiner <bog@khumba.net> | 2024-05-06 17:13:13 -0700 |
---|---|---|
committer | Bryan Gardiner <bog@khumba.net> | 2024-05-06 17:16:37 -0700 |
commit | 0933df9b35c43ead74e4e19bf99acc3e07f0e5e9 (patch) | |
tree | 45151d6408b9688011501a30751cb3fdcacd96b9 | |
parent | 026afbadeee8f4b20a63ef0f7bd70213b04321f7 (diff) | |
download | lazygl2srht-0933df9b35c43ead74e4e19bf99acc3e07f0e5e9.tar.gz |
Allow the milestones file to be missing.
-rwxr-xr-x | import_issues.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/import_issues.py b/import_issues.py index d301c1d..a9a289d 100755 --- a/import_issues.py +++ b/import_issues.py @@ -433,9 +433,12 @@ def run( # note.author.name for a subset of relevant users. milestone_jsons = [] - with open(export_dir_path / "milestones.ndjson") as milestones_file: - for line in milestones_file: - milestone_jsons.append(json.loads(line)) + milestones_file_path = export_dir_path / "milestones.ndjson" + # This file may not exist if the project has no milestones. + if milestones_file_path.exists(): + with open(milestones_file_path) as milestones_file: + for line in milestones_file: + milestone_jsons.append(json.loads(line)) milestone_ids_to_titles = {} for milestone_json in milestone_jsons: |