better way to change the module name
This commit is contained in:
parent
df20443b29
commit
682185bac1
|
@ -92,15 +92,10 @@ from hostkeys import HostKeys
|
||||||
from config import SSHConfig
|
from config import SSHConfig
|
||||||
|
|
||||||
# fix module names for epydoc
|
# fix module names for epydoc
|
||||||
for x in (Transport, SecurityOptions, Channel, SFTPServer, SSHException,
|
for c in locals().values():
|
||||||
PasswordRequiredException, BadAuthenticationType, ChannelFile,
|
if issubclass(type(c), type) or type(c).__name__ == 'classobj':
|
||||||
SubsystemHandler, AuthHandler, RSAKey, DSSKey, SFTPError,
|
# classobj for exceptions :/
|
||||||
SFTP, SFTPClient, SFTPServer, Message, Packetizer, SFTPAttributes,
|
c.__module__ = __name__
|
||||||
SFTPHandle, SFTPServerInterface, BufferedFile, Agent, AgentKey,
|
|
||||||
PKey, BaseSFTP, SFTPFile, ServerInterface, HostKeys, SSHClient,
|
|
||||||
MissingHostKeyPolicy, AutoAddPolicy, RejectPolicy, ChannelException,
|
|
||||||
SSHConfig, BadHostKeyException, AuthenticationException):
|
|
||||||
x.__module__ = 'paramiko'
|
|
||||||
|
|
||||||
from common import AUTH_SUCCESSFUL, AUTH_PARTIALLY_SUCCESSFUL, AUTH_FAILED, \
|
from common import AUTH_SUCCESSFUL, AUTH_PARTIALLY_SUCCESSFUL, AUTH_FAILED, \
|
||||||
OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_FAILED_CONNECT_FAILED, \
|
OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_FAILED_CONNECT_FAILED, \
|
||||||
|
|
Loading…
Reference in New Issue