Make kill_signal accept strings. (#506)

This commit is contained in:
Felix Fontein 2022-11-28 22:10:07 +01:00 committed by GitHub
parent 70d68dd2bd
commit edf0d3ec99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - the ``kill_signal`` option erroneously did not accept strings anymore since 3.0.0 (https://github.com/ansible-collections/community.docker/issues/505, https://github.com/ansible-collections/community.docker/pull/506)."

View File

@ -302,7 +302,7 @@ class DockerAPIEngineDriver(EngineDriver):
def kill_container(self, client, container_id, kill_signal=None):
params = {}
if kill_signal is not None:
params['signal'] = int(kill_signal)
params['signal'] = kill_signal
client.post_call('/containers/{0}/kill', container_id, params=params)
def stop_container(self, client, container_id, timeout=None):