summaryrefslogtreecommitdiff
path: root/scripts/install.py
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-10-26 09:59:39 -0700
committerSteve Bennetts <steve@lindenlab.com>2009-10-26 09:59:39 -0700
commitd6e8f32b8073d85db59f2a45a10d622b71c859ae (patch)
tree953c5efd60338604c229824467270cd8d5a458ce /scripts/install.py
parentadd9298c1e4d74bdb5503722a6c795ea6f30fa11 (diff)
parent53c972a521cbb92c6c9390c41b250a41dc22cd5a (diff)
merge
Diffstat (limited to 'scripts/install.py')
-rwxr-xr-xscripts/install.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/install.py b/scripts/install.py
index 6278fba16c..78b8880b95 100755
--- a/scripts/install.py
+++ b/scripts/install.py
@@ -64,7 +64,6 @@ def add_indra_lib_path():
base_dir = add_indra_lib_path()
import copy
-import md5
import optparse
import os
import platform
@@ -75,7 +74,12 @@ import tempfile
import urllib2
import urlparse
-from sets import Set as set, ImmutableSet as frozenset
+try:
+ # Python 2.6
+ from hashlib import md5
+except ImportError:
+ # Python 2.5 and earlier
+ from md5 import new as md5
from indra.base import llsd
from indra.util import helpformatter
@@ -106,7 +110,7 @@ class InstallFile(object):
return "ifile{%s:%s}" % (self.pkgname, self.url)
def _is_md5sum_match(self):
- hasher = md5.new(file(self.filename, 'rb').read())
+ hasher = md5(file(self.filename, 'rb').read())
if hasher.hexdigest() == self.md5sum:
return True
return False