summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2006-09-07 18:55:16 -0700
committerRobey Pointer <robey@lag.net>2006-09-07 18:55:16 -0700
commit682185bac161244838b7d6da0c2247db997145ff (patch)
tree9830bda77db3e6ebe9b959db0feb3c20477bd384
parentdf20443b29b0da3e8ad0ebbdab07ed8573406790 (diff)
[project @ robey@lag.net-20060908015516-1b8ac2af031586fe]
better way to change the module name
-rw-r--r--paramiko/__init__.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/paramiko/__init__.py b/paramiko/__init__.py
index 4d970c5b..ceefe474 100644
--- a/paramiko/__init__.py
+++ b/paramiko/__init__.py
@@ -92,15 +92,10 @@ from hostkeys import HostKeys
from config import SSHConfig
# fix module names for epydoc
-for x in (Transport, SecurityOptions, Channel, SFTPServer, SSHException,
- PasswordRequiredException, BadAuthenticationType, ChannelFile,
- SubsystemHandler, AuthHandler, RSAKey, DSSKey, SFTPError,
- SFTP, SFTPClient, SFTPServer, Message, Packetizer, SFTPAttributes,
- SFTPHandle, SFTPServerInterface, BufferedFile, Agent, AgentKey,
- PKey, BaseSFTP, SFTPFile, ServerInterface, HostKeys, SSHClient,
- MissingHostKeyPolicy, AutoAddPolicy, RejectPolicy, ChannelException,
- SSHConfig, BadHostKeyException, AuthenticationException):
- x.__module__ = 'paramiko'
+for c in locals().values():
+ if issubclass(type(c), type) or type(c).__name__ == 'classobj':
+ # classobj for exceptions :/
+ c.__module__ = __name__
from common import AUTH_SUCCESSFUL, AUTH_PARTIALLY_SUCCESSFUL, AUTH_FAILED, \
OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_FAILED_CONNECT_FAILED, \