From ddc8510f18df4a00e8adbbe15be04cfef32e5417 Mon Sep 17 00:00:00 2001 From: Hector Garcia de Marina Date: Thu, 16 Nov 2017 17:04:01 +0100 Subject: [PATCH] Python script exits in a clean way (#2186) --- sw/ground_segment/python/gvf/gvfFormation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/ground_segment/python/gvf/gvfFormation.py b/sw/ground_segment/python/gvf/gvfFormation.py index ce1d7eec88..bf979a8398 100644 --- a/sw/ground_segment/python/gvf/gvfFormation.py +++ b/sw/ground_segment/python/gvf/gvfFormation.py @@ -118,7 +118,6 @@ def formation(B, ds, radius, k): def main(): if len(sys.argv) != 6: print("Usage: gvfFormationApp topology.txt desired_sigma.txt ids.txt radius k") - interface.shutdown() return B = np.loadtxt(sys.argv[1]) @@ -164,8 +163,9 @@ def main(): formation(B, desired_sigmas, radius, k) except KeyboardInterrupt: - interface.shutdown() + return if __name__ == '__main__': main() + interface.shutdown()