From e0c3504a305acb2088e534d7d983422b81383fa7 Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Tue, 1 Dec 2009 18:14:21 +0100 Subject: Simplified generate_uuid function --- blogthon.cgi | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'blogthon.cgi') 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): -- cgit v1.2.3