mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-26 21:14:19 +00:00
🐞 Don't crash if a Scroll file isn't found
This commit is contained in:
parent
f36d82397a
commit
3457f05ec0
2 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "royalnet"
|
name = "royalnet"
|
||||||
version = "6.0.0a14"
|
version = "6.0.0a15"
|
||||||
description = "A multipurpose bot and web framework"
|
description = "A multipurpose bot and web framework"
|
||||||
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
|
|
|
@ -78,6 +78,8 @@ class Scroll:
|
||||||
return cls.loaders[lext](namespace=namespace, file_path=file_path)
|
return cls.loaders[lext](namespace=namespace, file_path=file_path)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise InvalidFileType(f"Invalid extension: {lext}")
|
raise InvalidFileType(f"Invalid extension: {lext}")
|
||||||
|
except FileNotFoundError:
|
||||||
|
return cls(namespace=namespace)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _validate_key(cls, item: str):
|
def _validate_key(cls, item: str):
|
||||||
|
|
Loading…
Reference in a new issue