aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: