Skip to content

Commit

Permalink
tools: Improve error reporting if -b not passed
Browse files Browse the repository at this point in the history
  • Loading branch information
dnadlinger committed Sep 10, 2024
1 parent 51b19e5 commit f25b8f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wand/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def load_config(args, name_suffix=""):
try:
config = pyon.load_file(config_path)
except FileNotFoundError:
if not backup_path:
logger.error("Server configuration file not found, but network drive " +
"backup path also not set (consider passing --backup-dir)")
raise
logger.warning("Unable to find server configuration file, "
"restoring from backup")
shutil.copyfile(backup_path, config_path)
Expand Down

0 comments on commit f25b8f5

Please sign in to comment.