Tres Seaver
2009-05-08 719cb97efe037844924d1bd9e820d2cd27d1e3a3
repoze/who/plugins/sql.py
@@ -6,8 +6,8 @@
def default_password_compare(cleartext_password, stored_password_hash):
    try:
        from hashlib import sha1
    except ImportError: # Python < 2.5
        from sha import new as sha1
    except ImportError: # Python < 2.5 #pragma NO COVERAGE
        from sha import new as sha1    #pragma NO COVERAGE
    # the stored password is stored as '{SHA}<SHA hexdigest>'.
    # or as a cleartext password (no {SHA} prefix)
@@ -25,10 +25,10 @@
def make_psycopg_conn_factory(**kw):
    # convenience (I always seem to use Postgres)
    def conn_factory():
        import psycopg2
        return psycopg2.connect(kw['repoze.who.dsn'])
    return conn_factory
    def conn_factory(): #pragma NO COVERAGE
        import psycopg2 #pragma NO COVERAGE
        return psycopg2.connect(kw['repoze.who.dsn']) #pragma NO COVERAGE
    return conn_factory #pragma NO COVERAGE
class SQLAuthenticatorPlugin:
    implements(IAuthenticator)