~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/auth/authenticate.py

  • Committer: Matt Giuca
  • Date: 2009-04-25 15:04:46 UTC
  • Revision ID: matt.giuca@gmail.com-20090425150446-f6z2k8ogs8kgyh1y
Tags: 0.1.9.12
ivle.chat, ivle.database, ivle.makeuser: Replaced use of md5 library with
    hashlib to avoid Python 2.6 producing DeprecationWarnings.
    Also use hexdigest() instead of digest().encode('hex').

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
                # We just got ourselves some user details from an external
92
92
                # source. Put them in the DB.
93
93
                store.add(auth_result)
94
 
                pass
 
94
 
 
95
            # Don't allow login if it is expired or disabled.
 
96
            if auth_result.state == 'disabled' or auth_result.account_expired:
 
97
                raise AuthError("Account is not valid.")
 
98
 
95
99
            return auth_result
96
100
        else:
97
101
            raise AuthError("Internal error: "