|
2 | 2 | # SPDX-License-Identifier: MIT |
3 | 3 | """Package for Connection implementations.""" |
4 | 4 |
|
5 | | -import sys |
6 | 5 | import logging |
7 | 6 |
|
8 | 7 | logger = logging.getLogger(__name__) |
9 | 8 |
|
10 | | -if "-m" in sys.argv and "mfd_connect.rpyc_server" in sys.argv: |
11 | | - logger.log(logging.DEBUG, "Running as a module - skipping importing in mfd_connect.__init__") |
12 | | -else: |
13 | | - import platform |
| 9 | +import platform |
14 | 10 |
|
15 | | - from mfd_typing import OSName |
| 11 | +from mfd_typing import OSName |
16 | 12 |
|
17 | | - from .base import Connection, AsyncConnection, PythonConnection |
18 | | - from .local import LocalConnection |
19 | | - from .rpyc import RPyCConnection |
20 | | - from .tunneled_rpyc import TunneledRPyCConnection |
21 | | - from .sol import SolConnection |
22 | | - from .serial import SerialConnection |
23 | | - from .telnet.telnet import TelnetConnection |
24 | | - from .winrm import WinRmConnection |
| 13 | +from .base import Connection, AsyncConnection, PythonConnection |
| 14 | +from .local import LocalConnection |
| 15 | +from .rpyc import RPyCConnection |
| 16 | +from .tunneled_rpyc import TunneledRPyCConnection |
| 17 | +from .sol import SolConnection |
| 18 | +from .serial import SerialConnection |
| 19 | +from .telnet.telnet import TelnetConnection |
25 | 20 |
|
26 | | - if platform.system() != OSName.ESXI.value: |
27 | | - from .ssh import SSHConnection |
28 | | - from .interactive_ssh import InteractiveSSHConnection |
29 | | - from .tunneled_ssh import TunneledSSHConnection |
30 | | - from .rpyc_zero_deploy import RPyCZeroDeployConnection |
31 | | - from .pxssh import PxsshConnection |
| 21 | +if platform.system() != OSName.ESXI.value: |
| 22 | + from .winrm import WinRmConnection |
| 23 | + from .ssh import SSHConnection |
| 24 | + from .interactive_ssh import InteractiveSSHConnection |
| 25 | + from .tunneled_ssh import TunneledSSHConnection |
| 26 | + from .rpyc_zero_deploy import RPyCZeroDeployConnection |
| 27 | + from .pxssh import PxsshConnection |
0 commit comments