summaryrefslogtreecommitdiff
path: root/indra/lib/python
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-09-01 12:21:51 -0400
committerbrad kittenbrink <brad@lindenlab.com>2009-09-01 12:21:51 -0400
commitbae94e434090f83d12941ca25aca13203db671b6 (patch)
treeb83d09a5eb4780c5f3077ac73b10199582f6adcd /indra/lib/python
parent3069355a6f33b7bbcfc8c493910a40e6836249e1 (diff)
parent3dc23bc1831e84b8d8288d9a4f006f9597d9443a (diff)
Merged login-api with viewer-2.0.0-3 up through r132290.
Diffstat (limited to 'indra/lib/python')
-rw-r--r--indra/lib/python/indra/base/lluuid.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/lib/python/indra/base/lluuid.py b/indra/lib/python/indra/base/lluuid.py
index aceea29cd2..1cdd8e915b 100644
--- a/indra/lib/python/indra/base/lluuid.py
+++ b/indra/lib/python/indra/base/lluuid.py
@@ -26,8 +26,14 @@ THE SOFTWARE.
$/LicenseInfo$
"""
-import md5, random, socket, string, time, re
+import random, socket, string, time, re
import uuid
+try:
+ # Python 2.6
+ from hashlib import md5
+except ImportError:
+ # Python 2.5 and earlier
+ from md5 import new as md5
def _int2binstr(i,l):
s=''
@@ -196,7 +202,7 @@ class UUID(object):
from c++ implementation for portability reasons.
Returns self.
"""
- m = md5.new()
+ m = md5()
m.update(uuid.uuid1().bytes)
self._bits = m.digest()
return self