Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Commit

Permalink
Use sys.exit() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsource-autofix[bot] authored and alissonlauffer committed Mar 9, 2021
1 parent 039ad8d commit 399ccee
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/test3_inline.py
Expand Up @@ -39,7 +39,7 @@ def examine(result, type):
traceback.print_exc()
answer = raw_input('Do you want to continue? [y] ')
if answer != 'y':
exit(1)
sys.exit(1)

def on_inline_query(msg):
def compute():
Expand Down
4 changes: 2 additions & 2 deletions test/test3_send.py
Expand Up @@ -56,14 +56,14 @@ def examine(result, type):
traceback.print_exc()
answer = input('Do you want to continue? [y] ')
if answer != 'y':
exit(1)
sys.exit(1)

def send_everything_on_contact(msg):
content_type, chat_type, chat_id, msg_date, msg_id = amanobot.glance(msg, long=True)

if chat_id != USER_ID:
print('Unauthorized user:', msg['from']['id'])
exit(1)
sys.exit(1)

print('Received message from ID: %d' % chat_id)
print('Start sending various messages ...')
Expand Down
2 changes: 1 addition & 1 deletion test/test3_updates.py
Expand Up @@ -52,7 +52,7 @@ def examine(result, type):
traceback.print_exc()
answer = input('Do you want to continue? [y] ')
if answer != 'y':
exit(1)
sys.exit(1)

expected_content_type = None
content_type_iterator = iter([
Expand Down
2 changes: 1 addition & 1 deletion test/test3a_inline.py
Expand Up @@ -42,7 +42,7 @@ def examine(result, type):
print('Do you want to continue? [y]', end=' ')
answer = input()
if answer != 'y':
exit(1)
sys.exit(1)


def on_inline_query(msg):
Expand Down
4 changes: 2 additions & 2 deletions test/test3a_send_updates.py
Expand Up @@ -40,14 +40,14 @@ def examine(result, type):
print('Do you want to continue? [y]', end=' ')
answer = input()
if answer != 'y':
exit(1)
sys.exit(1)

async def send_everything(msg):
content_type, chat_type, chat_id, msg_date, msg_id = amanobot.glance(msg, long=True)

if chat_id != USER_ID:
print('Unauthorized user:', chat_id)
exit(1)
sys.exit(1)

print('Received message from ID: %d' % chat_id)
print('Start sending various messages ...')
Expand Down

0 comments on commit 399ccee

Please sign in to comment.