Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wmlxgettext and wmlindent change exit code #6500

Merged
merged 2 commits into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/tools/wmlindent
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,11 @@ def convertor(linefilter, arglist, exclude):

def sigint_handler(signal, frame):
"""This function defines what happens when the SIGINT signal is encountered by pressing ctrl-c during runtime.
When ctrl-c is pressed, a one-line message is displayed and Python exits with Status 0, which refers to successful termination.
When ctrl-c is pressed, a one-line message is displayed and Python exits with Status 1.
This overrides Python's default behavior of displaying a traceback when ctrl-c is pressed.
"""
print ('Aborted by pressing ctrl-c')
sys.exit(0)
sys.exit(1)
max-torch marked this conversation as resolved.
Show resolved Hide resolved

if __name__ == '__main__':
signal.signal(signal.SIGINT, sigint_handler)
Expand Down
4 changes: 2 additions & 2 deletions data/tools/wmlxgettext
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,11 @@ def main():

def sigint_handler(signal, frame):
"""This function defines what happens when the SIGINT signal is encountered by pressing ctrl-c during runtime.
When ctrl-c is pressed, a one-line message is displayed and Python exits with Status 0, which refers to successful termination.
When ctrl-c is pressed, a one-line message is displayed and Python exits with Status 1.
This overrides Python's default behavior of displaying a traceback when ctrl-c is pressed.
"""
print ('Aborted by pressing ctrl-c')
sys.exit(0)
sys.exit(1)



Expand Down