Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Null value #57

Merged
merged 4 commits into from
Feb 21, 2022
Merged

Null value #57

merged 4 commits into from
Feb 21, 2022

Conversation

rohe
Copy link
Collaborator

@rohe rohe commented Feb 19, 2022

Allow an attribute in the Configuration class to be set to None before assigning a non-None value.

@rohe rohe requested review from nsklikas and peppelinux February 19, 2022 08:00
@@ -105,12 +105,12 @@ def __getattr__(self, item, default=None):
return default

def __setattr__(self, key, value):
if key in self:
if key in self and self.key is not None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... or, consider if usefull, self.key not in (None, "", {}, [] ...)

self.key would only be None?

@peppelinux
Copy link
Member

Roland can we have v1.6.0 instead of 1.6.1?
we still have 1.5.4 in pypi

@rohe
Copy link
Collaborator Author

rohe commented Feb 19, 2022

Yes

@rohe rohe merged commit 24fcf93 into develop Feb 21, 2022
@rohe rohe deleted the null_value branch February 21, 2022 16:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants