mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Paramiko might not come standard everywhere (#54486)
* Paramiko might not come standard everywhere There is a platform where paramiko isn't shipped but a special version of paramiko just for our use is shipped. This code imports paramiko from that location.
This commit is contained in:
@@ -176,7 +176,13 @@ with warnings.catch_warnings():
|
||||
try:
|
||||
import paramiko
|
||||
HAVE_PARAMIKO = True
|
||||
except (ImportError, AttributeError) as err: # paramiko and gssapi are incompatible and raise AttributeError not ImportError
|
||||
except ImportError:
|
||||
try:
|
||||
import ansible_paramiko as paramiko
|
||||
HAVE_PARAMIKO = True
|
||||
except (ImportError, AttributeError) as err: # paramiko and gssapi are incompatible and raise AttributeError not ImportError
|
||||
PARAMIKO_IMP_ERR = err
|
||||
except AttributeError as err: # paramiko and gssapi are incompatible and raise AttributeError not ImportError
|
||||
PARAMIKO_IMP_ERR = err
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user