aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorJacek Antonelli2009-09-03 00:59:17 -0500
committerJacek Antonelli2009-09-03 00:59:17 -0500
commit428d872be7b0896f85dd5bbd83df8a2d2f429b42 (patch)
treec955a5af8a4b76b94d4029d3ced3133edc977b28 /linden
parentMerge branch 'mac-openal-url' into next (diff)
downloadmeta-impy-428d872be7b0896f85dd5bbd83df8a2d2f429b42.zip
meta-impy-428d872be7b0896f85dd5bbd83df8a2d2f429b42.tar.gz
meta-impy-428d872be7b0896f85dd5bbd83df8a2d2f429b42.tar.bz2
meta-impy-428d872be7b0896f85dd5bbd83df8a2d2f429b42.tar.xz
Updated some python scripts to not use deprecated modules.
Diffstat (limited to '')
-rw-r--r--linden/indra/lib/python/indra/base/lluuid.py5
-rw-r--r--linden/indra/lib/python/indra/ipc/llmessage.py6
-rwxr-xr-xlinden/scripts/install.py6
3 files changed, 7 insertions, 10 deletions
diff --git a/linden/indra/lib/python/indra/base/lluuid.py b/linden/indra/lib/python/indra/base/lluuid.py
index aceea29..40ce818 100644
--- a/linden/indra/lib/python/indra/base/lluuid.py
+++ b/linden/indra/lib/python/indra/base/lluuid.py
@@ -26,7 +26,8 @@ THE SOFTWARE.
26$/LicenseInfo$ 26$/LicenseInfo$
27""" 27"""
28 28
29import md5, random, socket, string, time, re 29import random, socket, string, time, re
30from hashlib import md5
30import uuid 31import uuid
31 32
32def _int2binstr(i,l): 33def _int2binstr(i,l):
@@ -196,7 +197,7 @@ class UUID(object):
196 from c++ implementation for portability reasons. 197 from c++ implementation for portability reasons.
197 Returns self. 198 Returns self.
198 """ 199 """
199 m = md5.new() 200 m = md5()
200 m.update(uuid.uuid1().bytes) 201 m.update(uuid.uuid1().bytes)
201 self._bits = m.digest() 202 self._bits = m.digest()
202 return self 203 return self
diff --git a/linden/indra/lib/python/indra/ipc/llmessage.py b/linden/indra/lib/python/indra/ipc/llmessage.py
index 6161bad..91fb36b 100644
--- a/linden/indra/lib/python/indra/ipc/llmessage.py
+++ b/linden/indra/lib/python/indra/ipc/llmessage.py
@@ -26,8 +26,6 @@ THE SOFTWARE.
26$/LicenseInfo$ 26$/LicenseInfo$
27""" 27"""
28 28
29from sets import Set, ImmutableSet
30
31from compatibility import Incompatible, Older, Newer, Same 29from compatibility import Incompatible, Older, Newer, Same
32from tokenstream import TokenStream 30from tokenstream import TokenStream
33 31
@@ -44,8 +42,8 @@ class Template:
44 42
45 def compatibleWithBase(self, base): 43 def compatibleWithBase(self, base):
46 messagenames = ( 44 messagenames = (
47 ImmutableSet(self.messages.keys()) 45 frozenset(self.messages.keys())
48 | ImmutableSet(base.messages.keys()) 46 | frozenset(base.messages.keys())
49 ) 47 )
50 48
51 compatibility = Same() 49 compatibility = Same()
diff --git a/linden/scripts/install.py b/linden/scripts/install.py
index f886a6e..3843c83 100755
--- a/linden/scripts/install.py
+++ b/linden/scripts/install.py
@@ -34,7 +34,7 @@ $/LicenseInfo$
34""" 34"""
35 35
36import copy 36import copy
37import md5 37from hashlib import md5
38import optparse 38import optparse
39import os 39import os
40import platform 40import platform
@@ -46,8 +46,6 @@ import tempfile
46import urllib2 46import urllib2
47import urlparse 47import urlparse
48 48
49from sets import Set as set, ImmutableSet as frozenset
50
51# Locate -our- python library relative to our install location. 49# Locate -our- python library relative to our install location.
52from os.path import realpath, dirname, join 50from os.path import realpath, dirname, join
53 51
@@ -76,7 +74,7 @@ class InstallFile(object):
76 return "ifile{%s:%s}" % (self.pkgname, self.url) 74 return "ifile{%s:%s}" % (self.pkgname, self.url)
77 75
78 def _is_md5sum_match(self): 76 def _is_md5sum_match(self):
79 hasher = md5.new(file(self.filename, 'rb').read()) 77 hasher = md5(file(self.filename, 'rb').read())
80 if hasher.hexdigest() == self.md5sum: 78 if hasher.hexdigest() == self.md5sum:
81 return True 79 return True
82 return False 80 return False