Skip to content

Commit 9259b4b

Browse files
authored
fix None type bug (#20)
* fix None type bug * add change log fragment
1 parent bc0cff6 commit 9259b4b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bugfixes:
2+
- fix a bug where some commands produces no output which cause to crash the module.

plugins/modules/sap_control_exec.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,10 @@ def main():
384384
result['msg'] = 'Something went wrong connecting to the SAPCONTROL SOAP API.'
385385
module.fail_json(**result)
386386

387-
returned_data = recursive_dict(conn)
387+
if conn is not None:
388+
returned_data = recursive_dict(conn)
389+
else:
390+
returned_data = conn
388391

389392
result['changed'] = True
390393
result['msg'] = "Succesful execution of: " + function

0 commit comments

Comments
 (0)