Skip to content

Commit

Permalink
Error prevention improved
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitro4542 committed May 29, 2023
1 parent 4b63866 commit b745cdd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions scripts/backup-mods.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def randomword(length):
if os.path.isdir(config.get('Paths','default-backup-path')) != True:
print("The backup path in the configuration isn't valid or doesn't exist.")
quit()
elif config.get('Paths','default-backup-path') == "NOT_SET":
print("The backup path in the configuration isn't given.")
quit()
if config.get('Paths','minecraft-mod-folder') != "default":
if os.path.isdir(config.get('Paths','minecraft-mod-folder')) != True:
print("The minecraft mod folder path in the configuration isn't valid or doesn't exist.")
Expand Down
6 changes: 5 additions & 1 deletion scripts/prepare-mod-pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ def randomword(length):

# Check configuration
if args.cache_folder == None:
if config.get('Paths','cache-folder') == "NOT_SET":
if config.get('Paths','cache-folder') != "NOT_SET":
if os.path.isdir(config.get('Paths','cache-folder')) != True:
print("The cache path in the configuration isn't given.")
quit()
elif config.get('Paths','cache-folder') == "NOT_SET":
print("The cache path in the configuration isn't given.")
quit()

Expand Down

0 comments on commit b745cdd

Please sign in to comment.