From 3a3730e30fec19513c6e57c0987636e2ef946bb9 Mon Sep 17 00:00:00 2001 From: AAriam <80158628+AAriam@users.noreply.github.com> Date: Mon, 18 Nov 2024 18:37:34 +0100 Subject: [PATCH] Release version 0.0.0.dev40 --- pyproject.toml | 6 +++--- requirements.txt | 4 ++-- src/pyserials/property_dict.py | 5 ++++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2c60c77..4de8baa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ namespaces = true # ----------------------------------------- Project Metadata ------------------------------------- # [project] -version = "0.0.0.dev39" +version = "0.0.0.dev40" name = "PySerials" dependencies = [ "jsonschema >= 4.21.0, < 5", @@ -26,8 +26,8 @@ dependencies = [ "ruamel.yaml >= 0.17.32, < 0.18", # https://yaml.readthedocs.io/en/stable/ "ruamel.yaml.string >= 0.1.1, < 1", "tomlkit >= 0.11.8, < 0.12", # https://tomlkit.readthedocs.io/en/stable/, - "MDit == 0.0.0.dev36", - "ExceptionMan == 0.0.0.dev36", + "MDit == 0.0.0.dev37", + "ExceptionMan == 0.0.0.dev37", "ProtocolMan == 0.0.0.dev2", ] requires-python = ">=3.10" diff --git a/requirements.txt b/requirements.txt index 31d2e25..8b94a4b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,6 @@ jsonpath-ng >= 1.6.1, < 2 ruamel.yaml >= 0.17.32, < 0.18 ruamel.yaml.string >= 0.1.1, < 1 tomlkit >= 0.11.8, < 0.12 -MDit == 0.0.0.dev36 -ExceptionMan == 0.0.0.dev36 +MDit == 0.0.0.dev37 +ExceptionMan == 0.0.0.dev37 ProtocolMan == 0.0.0.dev2 \ No newline at end of file diff --git a/src/pyserials/property_dict.py b/src/pyserials/property_dict.py index d98a960..2d53bab 100644 --- a/src/pyserials/property_dict.py +++ b/src/pyserials/property_dict.py @@ -19,7 +19,10 @@ def setdefault(self, key, default): return self._data.setdefault(key, default) def __getattr__(self, name: str): - return self._data[name] + try: + return self._data[name] + except KeyError: + raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'") def __getitem__(self, name: str): return self._data[name]