Skip to content

Commit

Permalink
Nawab: Fix the keyboard Interrupt
Browse files Browse the repository at this point in the history
This commit fixes #58
  • Loading branch information
iammarco11 committed May 17, 2020
1 parent 9e1fc89 commit 255451d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions nawab.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pandas as pd
import pwd
import os
import sys
import threading
import argparse
import logging
Expand Down Expand Up @@ -119,5 +120,12 @@ def main():
nawab.tg_bot_run()


if __name__ == "__main__":
main()
if __name__ == '__main__':
try:
main()
except KeyboardInterrupt:
print('Interrupted')
try:
sys.exit(0)
except SystemExit:
os._exit(0)

0 comments on commit 255451d

Please sign in to comment.