diff options
Diffstat (limited to 'mdbp')
-rw-r--r-- | mdbp/common.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mdbp/common.py b/mdbp/common.py index eccefc1..ba4b20d 100644 --- a/mdbp/common.py +++ b/mdbp/common.py @@ -53,10 +53,8 @@ def buildjson_patch_relative(buildobj: JsonObject, except KeyError: break else: - try: + with contextlib.suppress(KeyError): obj[attrs[-1]] = str(basedir / pathlib.Path(obj[attrs[-1]])) - except KeyError: - pass def buildjson(filename: str) -> JsonObject: """Type constructor for argparse validating a build json file path and |