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

« back to all changes in this revision

Viewing changes to ivle/database.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:
24
24
It also provides miscellaneous utility functions for database interaction.
25
25
"""
26
26
 
27
 
import md5
 
27
import hashlib
28
28
import datetime
29
29
 
30
30
from storm.locals import create_database, Store, Int, Unicode, DateTime, \
214
214
 
215
215
    @staticmethod
216
216
    def hash_password(password):
217
 
        return md5.md5(password).hexdigest()
 
217
        return hashlib.md5(password).hexdigest()
218
218
 
219
219
    @classmethod
220
220
    def get_by_login(cls, store, login):