blob: 045b00ea4a28dced461e90fc757d862512499ea1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
"""A module to import instead of paramiko when it is not available (to avoid
checking for paramiko all over the place).
When paramiko is first envoked, it simply shuts down mycli, telling
user they either have to install paramiko or should not use SSH
features.
"""
class Paramiko:
def __getattr__(self, name):
import sys
from textwrap import dedent
print(dedent("""
To enable certain SSH features you need to install paramiko:
pip install paramiko
It is required for the following configuration options:
--list-ssh-config
--ssh-config-host
--ssh-host
"""))
sys.exit(1)
paramiko = Paramiko()
|