Potentially exit more gracefully on Ctrl+C?

Signed-off-by: TheTechRobo <thetechrobo@protonmail.ch>
This commit is contained in:
TheTechRobo 2022-04-03 18:08:53 +00:00
parent e426aecaeb
commit b36ed20b84
1 changed files with 0 additions and 5 deletions

View File

@ -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)