]> git.zarvox.org Git - shortlog.git/commitdiff
Import hashlib instead of (deprecated) md5.
authorDrew Fisher <drew.m.fisher@gmail.com>
Mon, 2 May 2011 23:15:11 +0000 (18:15 -0500)
committerDrew Fisher <drew.m.fisher@gmail.com>
Mon, 2 May 2011 23:15:11 +0000 (18:15 -0500)
Thanks to Matt Mullins for pointing this bug out.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
shortlog.py

index aa45f10a9e2db2ddc270a54f13ed64c46b121ff0..797b761669a5f8bba7f06fd16506331f056dac12 100644 (file)
@@ -5,7 +5,7 @@ import os
 import datetime
 import re
 import smtplib
-import md5
+import hashlib
 
 pwd = os.path.dirname( os.path.realpath( __file__ ) )
 
@@ -61,7 +61,7 @@ def loadComment(filepath):
        websiteline = f.readline().strip()
        timestamp = f.readline().strip()
        commentbody = makeParas(map(str.strip, f.readlines()))
-       m = md5.new()
+       m = hashlib.md5()
        m.update(emailline.lower())
        gravatar = "http://www.gravatar.com/avatar/%s?s=48&d=identicon" % str(m.hexdigest())
        #timestamp = datetime.datetime.fromtimestamp(os.stat(filepath).st_mtime).isoformat()