mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 04:41:26 -07: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:
parent
48c7501768
commit
b03c16fa8b
5 changed files with 28 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue