diff options
author | Jacek Antonelli | 2009-09-03 00:59:17 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-09-03 00:59:17 -0500 |
commit | 428d872be7b0896f85dd5bbd83df8a2d2f429b42 (patch) | |
tree | c955a5af8a4b76b94d4029d3ced3133edc977b28 | |
parent | Merge branch 'mac-openal-url' into next (diff) | |
download | meta-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-- | ChangeLog.txt | 9 | ||||
-rw-r--r-- | linden/indra/lib/python/indra/base/lluuid.py | 5 | ||||
-rw-r--r-- | linden/indra/lib/python/indra/ipc/llmessage.py | 6 | ||||
-rwxr-xr-x | linden/scripts/install.py | 6 |
4 files changed, 16 insertions, 10 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index a42b4be..ff89a5b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,3 +1,12 @@ | |||
1 | 2009-09-03 Jacek Antonelli <jacek.antonelli@gmail.com> | ||
2 | |||
3 | * Updated some python scripts to not use deprecated modules. | ||
4 | |||
5 | modified: linden/indra/lib/python/indra/base/lluuid.py | ||
6 | modified: linden/indra/lib/python/indra/ipc/llmessage.py | ||
7 | modified: linden/scripts/install.py | ||
8 | |||
9 | |||
1 | 2009-06-14 McCabe Maxsted <hakushakukun@gmail.com> | 10 | 2009-06-14 McCabe Maxsted <hakushakukun@gmail.com> |
2 | 11 | ||
3 | * Added IM preference for showing IMs in either main or local chat. | 12 | * Added IM preference for showing IMs in either main or local chat. |
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 | ||
29 | import md5, random, socket, string, time, re | 29 | import random, socket, string, time, re |
30 | from hashlib import md5 | ||
30 | import uuid | 31 | import uuid |
31 | 32 | ||
32 | def _int2binstr(i,l): | 33 | def _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 | ||
29 | from sets import Set, ImmutableSet | ||
30 | |||
31 | from compatibility import Incompatible, Older, Newer, Same | 29 | from compatibility import Incompatible, Older, Newer, Same |
32 | from tokenstream import TokenStream | 30 | from 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 | ||
36 | import copy | 36 | import copy |
37 | import md5 | 37 | from hashlib import md5 |
38 | import optparse | 38 | import optparse |
39 | import os | 39 | import os |
40 | import platform | 40 | import platform |
@@ -46,8 +46,6 @@ import tempfile | |||
46 | import urllib2 | 46 | import urllib2 |
47 | import urlparse | 47 | import urlparse |
48 | 48 | ||
49 | from 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. |
52 | from os.path import realpath, dirname, join | 50 | from 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 |