Skip to content

Commit 3fb8fe5

Browse files
committed
Only install signal handler in monitor mode
1 parent 93247eb commit 3fb8fe5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hapt/files/hapt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ def exit(self, signum):
269269

270270
if __name__ == '__main__':
271271
tracker = WirelessDevicesTracker()
272-
signal.signal(signal.SIGINT, tracker.exit)
273272

274273
tracker.oneshot()
275274
if len(sys.argv) > 1 and sys.argv[1] == '--monitor':
275+
signal.signal(signal.SIGINT, tracker.exit)
276276
tracker.monitor()

0 commit comments

Comments
 (0)