Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import the right symbols if ansible version >= 2.2 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lxc_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
from ansible.compat.six import text_type, binary_type
from ansible.plugins.connection import ConnectionBase
from ansible.utils.path import unfrackpath, makedirs_safe
from ansible.utils.unicode import to_bytes, to_unicode, to_str

from ansible.release import __version__ as ansible_version
from distutils.version import LooseVersion
if LooseVersion(ansible_version) >= LooseVersion('2.2.0.0'):
from ansible.module_utils._text import to_bytes, to_text as to_unicode, to_native as to_str
else:
from ansible.utils.unicode import to_bytes, to_unicode, to_str

try:
from __main__ import display
Expand Down