made new web2py_uuid working on python 2.5
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.0.9 (2012-09-29 17:56:36) dev
|
||||
Version 2.0.9 (2012-09-29 18:35:01) dev
|
||||
|
||||
@@ -157,8 +157,8 @@ def web2py_uuid(ctokens=UNPACKED_CTOKENS):
|
||||
It works like uuid.uuid4 except that tries to use os.urandom() if possible
|
||||
and it XORs the output with the tokens uniquely associated with this machine.
|
||||
"""
|
||||
rand_longs = struct.unpack('=QQ', bytes(bytearray(
|
||||
random.randrange(256) for i in xrange(16))))
|
||||
rand_longs = struct.unpack('=QQ', string.join(
|
||||
(chr(random.randrange(256)) for i in xrange(16)),''))
|
||||
if HAVE_URANDOM:
|
||||
urand_longs = struct.unpack('=QQ', fast_urandom16())
|
||||
byte_s = struct.pack('=QQ',
|
||||
|
||||
Reference in New Issue
Block a user