Older versions of rhn-client-tools don't understand containment tests.
This commit is contained in:
parent
54fdff16db
commit
91d98bb1a6
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue