Changeset 27083

Show
Ignore:
Timestamp:
07/02/2009 12:08:56 PM (14 months ago)
Author:
z3p
Message:

whitespace/80cols

Location:
branches/spwd-3242-3/twisted/conch
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/spwd-3242-3/twisted/conch/checkers.py

    r27082 r27083  
    5858 
    5959    @param username: the username of the user to return the passwd database 
    60     information for. 
     60        information for. 
    6161    """ 
    6262    if not pwd: 
     
    7272 
    7373    @param username: the username of the user to return the shadow database 
    74     information for. 
     74        information for. 
    7575    """ 
    7676    if not shadow: 
     
    8282class UNIXPasswordDatabase: 
    8383    """ 
    84     A checker which validates users out of the UNIX password databases, or a 
    85     databases a compatible format. 
     84    A checker which validates users out of the UNIX password databases, or 
     85    databases of a compatible format. 
    8686 
    8787    @ivar getpwnamFunctions: a C{tuple} of functions which are called in order 
    88     to valid a user.  The default value is (getpwnamPasswd, getpwnamShadow), 
    89     which tries the /etc/passwd database first, followed by the /etc/shadow 
    90     database. 
     88      to valid a user.  The default value is (getpwnamPasswd, getpwnamShadow), 
     89      which tries the /etc/passwd database first, followed by the /etc/shadow 
     90      database. 
    9191    """ 
    9292    credentialInterfaces = IUsernamePassword, 
  • branches/spwd-3242-3/twisted/conch/test/test_checkers.py

    r27082 r27083  
    1717try: 
    1818    import Crypto.Cipher.DES3 
    19     Crypto 
    2019    import pyasn1 
    2120except ImportError: 
     
    117116            return True 
    118117        self.patch(self.checker, 'checkKey', _checkKey) 
    119         credentials = SSHPrivateKey('test', 'ssh-rsa', 
    120                                     keydata.publicRSA_openssh, 'foo', 
    121                                     keys.Key.fromString( 
    122                 keydata.privateRSA_openssh).sign('foo')) 
     118        credentials = SSHPrivateKey( 
     119            'test', 'ssh-rsa', keydata.publicRSA_openssh, 'foo', 
     120            keys.Key.fromString(keydata.privateRSA_openssh).sign('foo')) 
    123121        d = self.checker.requestAvatarId(credentials) 
    124122        def _verify(avatarId): 
     
    137135            return True 
    138136        self.patch(self.checker, 'checkKey', _checkKey) 
    139         credentials = SSHPrivateKey('test', 'ssh-rsa', 
    140                                     keydata.publicRSA_openssh, None, None) 
     137        credentials = SSHPrivateKey( 
     138            'test', 'ssh-rsa', keydata.publicRSA_openssh, None, None) 
    141139        d = self.checker.requestAvatarId(credentials) 
    142140        return self.assertFailure(d, ValidPublicKey) 
     
    164162            return True 
    165163        self.patch(self.checker, 'checkKey', _checkKey) 
    166         credentials = SSHPrivateKey('test', 'ssh-rsa', 
    167                                     keydata.publicRSA_openssh, 'foo', 
    168                                     keys.Key.fromString( 
    169                 keydata.privateDSA_openssh).sign('foo')) 
     164        credentials = SSHPrivateKey( 
     165            'test', 'ssh-rsa', keydata.publicRSA_openssh, 'foo', 
     166            keys.Key.fromString(keydata.privateDSA_openssh).sign('foo')) 
    170167        d = self.checker.requestAvatarId(credentials) 
    171168        return self.assertFailure(d, UnauthorizedLogin) 
     
    284281    L{getpwnamShadow}. 
    285282    """ 
    286     if checkers.pwd is None: 
     283    if checkers.crypt is None: 
    287284        skip = 'cannot run without crypt module' 
    288     elif not getattr(os, 'O_NOCTTY', None): 
    289         skip = 'cannot run without os.O_NOCTTY' 
    290285 
    291286