From 387f243c1dcbbce87665bcb3e08d9ad58e45c52e Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Thu, 24 Oct 2013 20:00:36 -0400 Subject: [PATCH] [Python 3]: Workaround epydoc exceptions hack, since epydoc does not work on Python 3. --- paramiko/__init__.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/paramiko/__init__.py b/paramiko/__init__.py index 1e330e9..fb7a655 100644 --- a/paramiko/__init__.py +++ b/paramiko/__init__.py @@ -88,12 +88,16 @@ from paramiko.hostkeys import HostKeys from paramiko.config import SSHConfig from paramiko.proxy import ProxyCommand -# fix module names for epydoc -for c in locals().values(): - if issubclass(type(c), type) or type(c).__name__ == 'classobj': - # classobj for exceptions :/ - c.__module__ = __name__ -del c +import six + +if not six.PY3: + # Skipping port to Python 3 since, Epydoc has not been ported to Python 3. + # fix module names for epydoc + for c in locals().values(): + if issubclass(type(c), type) or type(c).__name__ == 'classobj': + # classobj for exceptions :/ + c.__module__ = __name__ + del c from paramiko.common import AUTH_SUCCESSFUL, AUTH_PARTIALLY_SUCCESSFUL, AUTH_FAILED, \ OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_FAILED_CONNECT_FAILED, \