mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
Python script exits in a clean way (#2186)
This commit is contained in:
committed by
Gautier Hattenberger
parent
d2079a780f
commit
ddc8510f18
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user