mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Use sys.exit instead of exit
The global exit function is designed only for the interpreter, so use the correct one. Also fix the plandomizer so it does not immediately error when run.
This commit is contained in:
@@ -3,6 +3,7 @@ import os
|
||||
import logging
|
||||
import random
|
||||
import textwrap
|
||||
import sys
|
||||
|
||||
from Main import main
|
||||
from Gui import guiMain
|
||||
@@ -191,11 +192,11 @@ if __name__ == '__main__':
|
||||
# ToDo: Validate files further than mere existance
|
||||
if not args.jsonout and not os.path.isfile(args.rom):
|
||||
input('Could not find valid base rom for patching at expected path %s. Please run with -h to see help for further information. \nPress Enter to exit.' % args.rom)
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
if args.sprite is not None and not os.path.isfile(args.sprite):
|
||||
if not args.jsonout:
|
||||
input('Could not find link sprite sheet at given location. \nPress Enter to exit.' % args.sprite)
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
else:
|
||||
raise IOError('Cannot find sprite file at %s' % args.sprite)
|
||||
|
||||
|
Reference in New Issue
Block a user