Skip to content

Commit

Permalink
fix : main function exit mode modified
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Aug 8, 2024
1 parent 3828806 commit a287910
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nafas/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import argparse
from nafas.functions import description_print, get_input_standard, input_filter
from nafas.functions import get_program_data, program_description_print, run
from nafas.params import NAFAS_VERSION
from nafas.params import NAFAS_VERSION, EXIT_MESSAGE
from art import tprint


Expand Down Expand Up @@ -34,7 +34,11 @@ def main():
input("Press [R] to restart or any other key to exit."))
if INPUTINDEX.upper() != "R":
EXIT_FLAG = True
print(EXIT_MESSAGE)


if __name__ == "__main__":
main()
try:
main()
except KeyboardInterrupt:
print(EXIT_MESSAGE)

0 comments on commit a287910

Please sign in to comment.