diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2016-11-17 14:04:22 -0800 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2016-11-17 14:04:22 -0800 |
commit | d3543ff67c788531cadfcaee19395bbb70125364 (patch) | |
tree | 4e0cdb44f44d23553aedd087225c8bc5794e6ba3 | |
parent | 5fc0d816017ab2935597cb16274634ffd48ab2e1 (diff) | |
download | ansible-modules-core-d3543ff67c788531cadfcaee19395bbb70125364.tar.gz |
Older versions of rhn-client-tools don't understand containment tests.
-rw-r--r-- | packaging/os/rhn_register.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packaging/os/rhn_register.py b/packaging/os/rhn_register.py index 2ecf3e0f..19618df1 100644 --- a/packaging/os/rhn_register.py +++ b/packaging/os/rhn_register.py @@ -161,9 +161,10 @@ class Rhn(RegistrationBase): # configuration. Yeah, I know this should be subclassed ... but, oh # well def get_option_default(self, key, default=''): - # ignore pep8 W601 errors for this line - # setting this to use 'in' does not work in the rhn library - if key in self: + # the class in rhn-client-tools that this comes from didn't + # implement __contains__(). That's why we check if the key is + # present in the dictionary that is the actual storage + if key in self.dict: return self[key] else: return default |