diff options
author | brad kittenbrink <brad@lindenlab.com> | 2009-08-27 16:25:02 -0400 |
---|---|---|
committer | brad kittenbrink <brad@lindenlab.com> | 2009-08-27 16:25:02 -0400 |
commit | d020dae7b9c156a08d1dd17eade7f36011f4d0fe (patch) | |
tree | 67b1a28222116b20c5fa7bcc1cbd86ca47a91aa7 /indra/lib | |
parent | 745845f79987e4b4ab7f5728746a0eda8898930f (diff) | |
parent | 70600ea66adc816e72e91e804deebde40ed6b1bc (diff) |
Merged latest login-api with latest viewer-2.0.0-3 up through plugin-api-05 merge (r131929).
Some minor post-merge cleanups still required.
Diffstat (limited to 'indra/lib')
-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 |