From 17f11a640ae3487409d8193a7c2527a48f4995ed Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Wed, 13 Oct 2021 16:16:32 +0200 Subject: [PATCH] create deep copies to allow changes of constraints per arrival --- aman/formats/SctEseFormat.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aman/formats/SctEseFormat.py b/aman/formats/SctEseFormat.py index 5df3074..359f29c 100644 --- a/aman/formats/SctEseFormat.py +++ b/aman/formats/SctEseFormat.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import copy import sys from aman.types.ArrivalRoute import ArrivalRoute @@ -137,10 +138,10 @@ class SctEseFormat: sys.stderr.write('Unable to find a close waypoint for ' + waypoint) sys.exit(-1) - waypoints.append(nearest) + waypoints.append(copy.deepcopy(nearest)) # extend the list of waypoints else: - waypoints.append(coordinates[0]) + waypoints.append(copy.deepcopy(coordinates[0])) # create the arrival route return ArrivalRoute(split[3], split[2], waypoints)