From 6dd9e8984d0baad9041e1dc3d1df42ae19d8a546 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Tue, 10 Jul 2018 20:20:04 +0100 Subject: [PATCH] issue #297: fix viewkeys use on 3.x. --- ansible_mitogen/plugins/connection/mitogen_local.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible_mitogen/plugins/connection/mitogen_local.py b/ansible_mitogen/plugins/connection/mitogen_local.py index c33cd64d..35504d4d 100644 --- a/ansible_mitogen/plugins/connection/mitogen_local.py +++ b/ansible_mitogen/plugins/connection/mitogen_local.py @@ -40,7 +40,9 @@ import ansible_mitogen.connection import ansible_mitogen.process -if sys.version_info > (2, 7): +if sys.version_info > (3,): + viewkeys = dict.keys +elif sys.version_info > (2, 7): viewkeys = dict.viewkeys else: viewkeys = lambda dct: set(dct)