Improve missing path test

This commit is contained in:
Orsiris de Jong 2024-11-03 21:32:19 +01:00
parent 70e2159677
commit dad801161d

View file

@ -1130,7 +1130,7 @@ class NPBackupRunner:
msg = f"You cannot backup source into it's own path in repo {self.repo_config.g('name')}. No inception allowed !"
self.write_logs(msg, level="critical")
return self.convert_to_json_output(False, msg)
except KeyError:
except (AttributeError, KeyError):
msg = f"No backup source given for repo {self.repo_config.g('name')}"
self.write_logs(msg, level="critical")
return self.convert_to_json_output(False, msg)