Simplified generate_uuid function
This commit is contained in:
parent
fbf43d5c44
commit
e0c3504a30
@ -16,12 +16,7 @@ import ConfigParser
|
|||||||
|
|
||||||
def generate_uuid(string):
|
def generate_uuid(string):
|
||||||
string_md5sum = md5.new(string).hexdigest()
|
string_md5sum = md5.new(string).hexdigest()
|
||||||
string_md5sum_1 = string_md5sum[0:8]
|
string = str.join('-', (string_md5sum[0:8], string_md5sum[8:12], string_md5sum[12:16], string_md5sum[16:20], string_md5sum[20:32]))
|
||||||
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
|
|
||||||
return string
|
return string
|
||||||
|
|
||||||
def errorpage(string):
|
def errorpage(string):
|
||||||
|
Loading…
Reference in New Issue
Block a user