aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2009-12-01 18:14:21 +0100
committerStefan Ritter <xeno@thehappy.de>2009-12-01 18:14:21 +0100
commite0c3504a305acb2088e534d7d983422b81383fa7 (patch)
treecfba377a96b4d950ca3d783e8cff952c6b5e47d9
parentfbf43d5c44a7d605cb256b76ceaef762f054d212 (diff)
Simplified generate_uuid function
-rwxr-xr-xblogthon.cgi7
1 files changed, 1 insertions, 6 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 1f936b8..e99bb91 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -16,12 +16,7 @@ import ConfigParser
def generate_uuid(string):
string_md5sum = md5.new(string).hexdigest()
- string_md5sum_1 = string_md5sum[0:8]
- string_md5sum_2 = string_md5sum[8:12]
- string_md5sum_3 = string_md5sum[12:16]
- string_md5sum_4 = string_md5sum[16:20]
- string_md5sum_5 = string_md5sum[20:32]
- string = string_md5sum_1 + '-' + string_md5sum_2 + '-' + string_md5sum_3 + '-' + string_md5sum_4 + '-' + string_md5sum_5
+ 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
def errorpage(string):