From 981249daa190528c29980c9e4d90fbec1315d315 Mon Sep 17 00:00:00 2001 From: Kassian Sun Date: Thu, 25 May 2017 08:55:02 +0800 Subject: [PATCH] use single line for-loop --- lib/ansible/modules/cloud/docker/docker_container.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/ansible/modules/cloud/docker/docker_container.py b/lib/ansible/modules/cloud/docker/docker_container.py index d79c713772..37fd620887 100644 --- a/lib/ansible/modules/cloud/docker/docker_container.py +++ b/lib/ansible/modules/cloud/docker/docker_container.py @@ -1698,10 +1698,7 @@ class Container(DockerBaseClass): self.log('_get_expected_sysctls') if config_sysctls is None: return None - result = dict() - for key, value in config_sysctls.items(): - result[key] = str(value) - return result + return {key: str(value) for key, value in config_systctls.items()} def _get_expected_cmd(self): self.log('_get_expected_cmd')