diff options
author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-06-22 15:39:14 -0700 |
---|---|---|
committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-06-22 15:39:14 -0700 |
commit | 1454c32dc0c5c99b3efb27be2306e0e06e433121 (patch) | |
tree | 8b7ffaf0dff019d871ceb81cbdcb46d9cbe3c328 /indra | |
parent | b012a60951f612b9a2c912dd64c00a3b09af5d3f (diff) | |
parent | 7306690dbd005cd595b72c01350452d7a5439d20 (diff) |
Merge with trunk
Diffstat (limited to 'indra')
-rw-r--r-- | indra/lib/python/indra/base/lluuid.py | 10 |
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 |