World.restore_path: Add value check
This commit is contained in:
parent
c7d0cbb5d3
commit
80b1b1ff9d
@ -27,4 +27,8 @@ class World:
|
||||
return os.path.join(self.persist_directory, filename)
|
||||
|
||||
def restore_path(self, filename: str) -> str:
|
||||
if self.restore_directory is None:
|
||||
raise ValueError(
|
||||
"Path cannot be formed because no directory for restoration was provided",
|
||||
)
|
||||
return os.path.join(self.restore_directory, filename)
|
||||
|
Loading…
x
Reference in New Issue
Block a user