aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2010-12-14 09:55:09 +0100
committerStefan Ritter <xeno@thehappy.de>2010-12-14 09:55:09 +0100
commitb48033facada8e216f2f6c89a6a7477233179af2 (patch)
tree64cb9b86d69552bd672aeff2adfaba04eb5ccf2d
parent51c4cfc7f24efe95e2300b042db71a8a575c6ece (diff)
Using hashlib instead of deprecated md51.0rc2
-rwxr-xr-xblogthon.cgi4
1 files changed, 2 insertions, 2 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 325903c..1a00590 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -21,7 +21,7 @@ import re
from ConfigParser import ConfigParser
from cgi import FieldStorage
from smtplib import SMTP
-from md5 import new as newmd5
+from hashlib import md5
from glob import glob
from random import randint
@@ -33,7 +33,7 @@ line_start_plus = re.compile("^\+.*$")
tab = "\t"
def generate_uuid(string):
- string_md5sum = newmd5(string).hexdigest()
+ string_md5sum = md5(string).hexdigest()
string = str.join("-", (string_md5sum[0:8], string_md5sum[8:12], string_md5sum[12:16], string_md5sum[16:20], string_md5sum[20:32]))
return string