This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/17/ |
On July 21st, 2014, 6:33 p.m. UTC, Miloslav Trmac wrote:
config/roles/testrole/role.py (Diff revision 1) 109 def get_property(x, prop):107 def do_get_property(x, prop):110 # At first cover additional settings.
108 # Cover additional settings.
111 # Then return the result of the call to get_property of the
112 # parent class.
113 if hasattr(x, "_settings") and prop in x._settings:114 return x._settings[prop]115 if prop == "myownsetting":109 if prop == "myownsetting":116 return x._name110 return x._nameSilently returns None on an unmatched property
On July 22nd, 2014, 12:36 p.m. UTC, Thomas Woerner wrote:
get_property is not needed if the setting is in _DEFAULTS, see RoleBase.get_property:
if hasattr(x, "_settings") and prop in x._settings: return x._settings[prop] ... elif prop in x._DEFAULTS: return x._DEFAULTS[prop]Therefore settings in _settings and in _DEFAULTS are already taken care of. This means get_property should not be needed in a Role.
On July 31st, 2014, 2:53 p.m. UTC, Miloslav Trmac wrote:
The concern is about completely unknown setting names; the final do_get_property() just returns None for them.
Dropped do_get_property from roles completely.
- Thomas
On July 22nd, 2014, 3:35 p.m. UTC, Thomas Woerner wrote:
Review request for RoleKit Mailing List, Stephen Gallagher and Thomas Woerner.
By Thomas Woerner.
Updated July 22, 2014, 3:35 p.m.
Repository:
rolekit
Description
Diffs
|