Potentially exit more gracefully on Ctrl+C?
Signed-off-by: TheTechRobo <thetechrobo@protonmail.ch>
This commit is contained in:
parent
e426aecaeb
commit
b36ed20b84
|
@ -50,7 +50,6 @@ class PlaceScraper:
|
|||
self.token = a[i + 26 : i + 57] # thanks JAA for stopping me from using my .split() fuckery
|
||||
async def _start_connection(self, ws):
|
||||
await ws.send(raw_data.connection_init % self.token)
|
||||
#await ws.send(raw_data.connection_init)
|
||||
await ws.send(raw_data.id1)
|
||||
await ws.send(raw_data.id2)
|
||||
async def run_forever(self):
|
||||
|
@ -83,7 +82,3 @@ while True:
|
|||
print(f"Caught {ename}")
|
||||
except KeyboardInterrupt:
|
||||
STOP = True
|
||||
if STOP:
|
||||
print("\tSTOP: Exited gracefully after CtrlC.")
|
||||
import sys
|
||||
sys.exit(130)
|
||||
|
|
Loading…
Reference in New Issue