fixed get
Dieser Commit ist enthalten in:
Ursprung
aa1a4db56c
Commit
6668d82f40
|
@ -85,12 +85,10 @@ class AnsibleModule(object):
|
|||
|
||||
def get(self, key: str, default: T = None) -> T:
|
||||
"""returns an Parameter of the Module."""
|
||||
if key not in self.params.keys():
|
||||
return default
|
||||
if key not in self.params:
|
||||
raise KeyError()
|
||||
if self.params[key] is None and default is not None:
|
||||
return default
|
||||
if self.params[key] is None or key not in self.params:
|
||||
raise KeyError()
|
||||
return self.params[key]
|
||||
|
||||
def changed_get(self):
|
||||
|
|
Laden…
In neuem Issue referenzieren