[Python 3]: Workaround epydoc exceptions hack, since epydoc does not work on Python 3.
This commit is contained in:
parent
2c538bd5fe
commit
387f243c1d
|
@ -88,12 +88,16 @@ from paramiko.hostkeys import HostKeys
|
||||||
from paramiko.config import SSHConfig
|
from paramiko.config import SSHConfig
|
||||||
from paramiko.proxy import ProxyCommand
|
from paramiko.proxy import ProxyCommand
|
||||||
|
|
||||||
# fix module names for epydoc
|
import six
|
||||||
for c in locals().values():
|
|
||||||
if issubclass(type(c), type) or type(c).__name__ == 'classobj':
|
if not six.PY3:
|
||||||
# classobj for exceptions :/
|
# Skipping port to Python 3 since, Epydoc has not been ported to Python 3.
|
||||||
c.__module__ = __name__
|
# fix module names for epydoc
|
||||||
del c
|
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, \
|
from paramiko.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