def cbInsecureLogin(result, proto, username, password):
 if (result.lower() == 'y'):
  return proto.login(username, password).addCallback(cbAuthentication, proto)
 return defer.fail(Exception('Login failed for security reasons.'))

def cbInsecureLogin ( result , proto , username , password ) : if ( result . lower ( ) == 'y' ) : return proto . login ( username , password ) . addCallback ( cbAuthentication , proto ) return defer . fail ( Exception ( 'Login failed for security reasons.' ) )
callback for "insecure-login" prompt .