mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-10 10:04:21 +01:00
Clean exit
This commit is contained in:
parent
764ba8d869
commit
9eff7b0f0b
@ -18,6 +18,7 @@
|
|||||||
# along with pirate-get. If not, see <http://www.gnu.org/licenses/>.
|
# along with pirate-get. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
@ -503,7 +504,7 @@ def main():
|
|||||||
"[q] Quit", sep="\n")
|
"[q] Quit", sep="\n")
|
||||||
elif code == 'q':
|
elif code == 'q':
|
||||||
print("User Cancelled.")
|
print("User Cancelled.")
|
||||||
break
|
sys.exit(0)
|
||||||
elif code == 'd':
|
elif code == 'd':
|
||||||
print_descriptions(choices)
|
print_descriptions(choices)
|
||||||
elif code == 'f':
|
elif code == 'f':
|
||||||
@ -518,7 +519,7 @@ def main():
|
|||||||
print('Exception:')
|
print('Exception:')
|
||||||
print(str(e))
|
print(str(e))
|
||||||
choices = ()
|
choices = ()
|
||||||
break
|
sys.exit(1)
|
||||||
|
|
||||||
if config.getboolean('SaveToFile', 'enabled'):
|
if config.getboolean('SaveToFile', 'enabled'):
|
||||||
# Save to file is enabled
|
# Save to file is enabled
|
||||||
|
Loading…
Reference in New Issue
Block a user