Index: twisted/conch/tap.py =================================================================== --- twisted/conch/tap.py (revision 26975) +++ twisted/conch/tap.py (working copy) @@ -16,8 +16,13 @@ from twisted.cred import portal from twisted.python import usage from twisted.application import strports +try: + from twisted.cred import pamauth +except ImportError: + pamauth = None +else: + from twisted.cred.checkers import PluggableAuthenticationModulesChecker - class Options(usage.Options): synopsis = "[-i ] [-p ] [-d ] " longdesc = "Makes a Conch SSH server." @@ -36,8 +41,8 @@ t.portal = portal.Portal(unix.UnixSSHRealm()) t.portal.registerChecker(checkers.UNIXPasswordDatabase()) t.portal.registerChecker(checkers.SSHPublicKeyDatabase()) - if checkers.pamauth: - t.portal.registerChecker(checkers.PluggableAuthenticationModulesChecker()) + if pamauth is not None: + t.portal.registerChecker(PluggableAuthenticationModulesChecker()) t.dataRoot = config['data'] t.moduliRoot = config['moduli'] or config['data'] port = config['port'] Index: twisted/conch/checkers.py =================================================================== --- twisted/conch/checkers.py (revision 26975) +++ twisted/conch/checkers.py (working copy) @@ -20,11 +20,6 @@ except: shadow = None -try: - from twisted.cred import pamauth -except ImportError: - pamauth = None - from zope.interface import implements, providedBy from twisted.conch import error