Skip to content

Commit 547c14e

Browse files
berndbohmeiersamdoran
authored andcommitted
Fix settings and password dict update (#899)
The update method on dict returns None, so we can not use the return value to set the variable as this will just delete the dictionary (cherry picked from commit 3386cba)
1 parent 17a55ea commit 547c14e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ansible_runner/config/_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def _prepare_env(self, runner_mode='pexpect'):
147147
self.runner_mode = runner_mode
148148
try:
149149
if self.settings and isinstance(self.settings, dict):
150-
self.settings = self.settings.update(self.loader.load_file('env/settings', Mapping))
150+
self.settings.update(self.loader.load_file('env/settings', Mapping))
151151
else:
152152
self.settings = self.loader.load_file('env/settings', Mapping)
153153
except ConfigurationError:
@@ -157,7 +157,7 @@ def _prepare_env(self, runner_mode='pexpect'):
157157
if self.runner_mode == 'pexpect':
158158
try:
159159
if self.passwords and isinstance(self.passwords, dict):
160-
self.passwords = self.passwords.update(self.loader.load_file('env/passwords', Mapping))
160+
self.passwords.update(self.loader.load_file('env/passwords', Mapping))
161161
else:
162162
self.passwords = self.passwords or self.loader.load_file('env/passwords', Mapping)
163163
self.expect_passwords = {

0 commit comments

Comments
 (0)