From: Drew Fisher Date: Mon, 2 May 2011 23:15:11 +0000 (-0500) Subject: Import hashlib instead of (deprecated) md5. X-Git-Url: http://git.zarvox.org/shortlog/2013?a=commitdiff_plain;h=a8cc2315b501d1ed096807553f8185966af3733d;p=shortlog.git Import hashlib instead of (deprecated) md5. Thanks to Matt Mullins for pointing this bug out. Signed-off-by: Drew Fisher --- diff --git a/shortlog.py b/shortlog.py index aa45f10..797b761 100644 --- a/shortlog.py +++ b/shortlog.py @@ -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()