From 468336e894775612117cf00b7161b90b20ad471b Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 22 Feb 2020 10:53:57 -0800 Subject: [PATCH] Minor fixes --- amanuensis/config/context.py | 6 +++--- amanuensis/errors.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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):