diff --git a/amanuensis/config/context.py b/amanuensis/config/context.py index 7baf982..bf22957 100644 --- a/amanuensis/config/context.py +++ b/amanuensis/config/context.py @@ -38,7 +38,7 @@ class ConfigDirectoryContext(): filename = f'{filename}.json' fpath = os.path.join(self.path, filename) if not os.path.isfile(fpath): - raise MissingConfigError(path) + raise MissingConfigError(fpath) return json_ro(fpath) def edit(self, filename): @@ -49,7 +49,7 @@ class ConfigDirectoryContext(): filename = f'{filename}.json' fpath = os.path.join(self.path, filename) if not os.path.isfile(fpath): - raise MissingConfigError(path) + raise MissingConfigError(fpath) return json_rw(fpath, new=False) def delete(self, filename): @@ -58,7 +58,7 @@ class ConfigDirectoryContext(): filename = f'{filename}.json' fpath = os.path.join(self.path, filename) if not os.path.isfile(fpath): - raise MissingConfigError(path) + raise MissingConfigError(fpath) os.delete(fpath) diff --git a/amanuensis/errors.py b/amanuensis/errors.py index aa9a02c..87ee595 100644 --- a/amanuensis/errors.py +++ b/amanuensis/errors.py @@ -4,13 +4,13 @@ class AmanuensisError(Exception): class MissingConfigError(AmanuensisError): """A config file is missing that was expected to be present""" def __init__(self, path): - super.__init__(self, "A config file or directory was expected to " + super().__init__(self, "A config file or directory was expected to " f"exist, but could not be found: {path}") class ConfigAlreadyExistsError(AmanuensisError): """Attempted to create a config, but it already exists""" def __init__(self, path): - super.__init__(self, "Attempted to create a config, but it already " + super().__init__(self, "Attempted to create a config, but it already " f"exists: {path}") class MalformedConfigError(AmanuensisError):