aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Gardiner <bog@khumba.net>2024-05-06 17:13:13 -0700
committerBryan Gardiner <bog@khumba.net>2024-05-06 17:16:37 -0700
commit0933df9b35c43ead74e4e19bf99acc3e07f0e5e9 (patch)
tree45151d6408b9688011501a30751cb3fdcacd96b9
parent026afbadeee8f4b20a63ef0f7bd70213b04321f7 (diff)
downloadlazygl2srht-0933df9b35c43ead74e4e19bf99acc3e07f0e5e9.tar.gz
Allow the milestones file to be missing.
-rwxr-xr-ximport_issues.py9
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: