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)