connection: drop shlex_quote import
shlex_quote has been part of the connection plugin since the Ansible 2.3 release. We don't need to do this anymore. Change-Id: I6be4e5fdce16154ea664ccb5cb26add268b8c9b2
This commit is contained in:
parent
74ae653e2f
commit
10fc539014
|
@ -257,14 +257,6 @@ SSH = imp.load_source(
|
||||||
os.path.join(os.path.dirname(conn.__file__), 'ssh.py')
|
os.path.join(os.path.dirname(conn.__file__), 'ssh.py')
|
||||||
)
|
)
|
||||||
|
|
||||||
if not hasattr(SSH, 'shlex_quote'):
|
|
||||||
# NOTE(cloudnull): Later versions of ansible has this attribute already
|
|
||||||
# however this is not set in all versions. Because we use
|
|
||||||
# this method the attribute will set within the plugin
|
|
||||||
# if it's not found.
|
|
||||||
from ansible.compat.six.moves import shlex_quote
|
|
||||||
setattr(SSH, 'shlex_quote', shlex_quote)
|
|
||||||
|
|
||||||
|
|
||||||
def retry(ExceptionToCheck, tries=3, delay=1, backoff=2):
|
def retry(ExceptionToCheck, tries=3, delay=1, backoff=2):
|
||||||
"""Retry calling the decorated function using an exponential backoff.
|
"""Retry calling the decorated function using an exponential backoff.
|
||||||
|
|
Loading…
Reference in New Issue