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:
|
def get(self, key: str, default: T = None) -> T:
|
||||||
"""returns an Parameter of the Module."""
|
"""returns an Parameter of the Module."""
|
||||||
if key not in self.params.keys():
|
if key not in self.params:
|
||||||
return default
|
raise KeyError()
|
||||||
if self.params[key] is None and default is not None:
|
if self.params[key] is None and default is not None:
|
||||||
return default
|
return default
|
||||||
if self.params[key] is None or key not in self.params:
|
|
||||||
raise KeyError()
|
|
||||||
return self.params[key]
|
return self.params[key]
|
||||||
|
|
||||||
def changed_get(self):
|
def changed_get(self):
|
||||||
|
|
Laden…
In neuem Issue referenzieren