Skip to content

Commit

Permalink
Exit message (#92)
Browse files Browse the repository at this point in the history
* fix : EXIT_MESSAGE added

* fix : main function exit mode modified

* fix : minor edit in exit message

* doc : CHANGELOG.md updated
  • Loading branch information
sepandhaghighi authored Aug 8, 2024
1 parent 700f8f7 commit ef87a47
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `Python 3.12` added to `test.yml`
- `Python 3.5` support dropped
- CLI mode updated
- Exit message updated
- `README.md` modified
## [0.6] - 2022-06-22
### Added
Expand Down
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("\n" + EXIT_MESSAGE)
2 changes: 2 additions & 0 deletions nafas/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

SOUND_WARNING_MESSAGE = "Your device is not compatible with our underlying sound-playing library. You can refer to https://github.com/openscilab/nava."

EXIT_MESSAGE = "See you. Bye!"

PROGRAM_DESCRIPTION = """Program Details :
Name : {0}
Expand Down

0 comments on commit ef87a47

Please sign in to comment.