summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Sig/MD5.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-04-15 18:43:38 (GMT)
committerSteven Knight <knight@baldmt.com>2002-04-15 18:43:38 (GMT)
commita8176f609ff3ecc090f51830408d3b4dc6338d7e (patch)
treebab059042f2f8cbc85dcf7a619dbebbbe23dc4fb /src/engine/SCons/Sig/MD5.py
parent05029e336146444501a66b53e4699c09d6e08977 (diff)
downloadSCons-a8176f609ff3ecc090f51830408d3b4dc6338d7e.zip
SCons-a8176f609ff3ecc090f51830408d3b4dc6338d7e.tar.gz
SCons-a8176f609ff3ecc090f51830408d3b4dc6338d7e.tar.bz2
Big change for shared libraries and a bunch of other flexibility. (Charles Crain)
Diffstat (limited to 'src/engine/SCons/Sig/MD5.py')
-rw-r--r--src/engine/SCons/Sig/MD5.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/engine/SCons/Sig/MD5.py b/src/engine/SCons/Sig/MD5.py
index c2331bd..251c1eb 100644
--- a/src/engine/SCons/Sig/MD5.py
+++ b/src/engine/SCons/Sig/MD5.py
@@ -78,12 +78,9 @@ def collect(signatures):
def signature(obj):
"""Generate a signature for an object
"""
- try:
- contents = str(obj.get_contents())
- except AttributeError, e:
- raise AttributeError, \
- "unable to fetch contents of '%s': %s" % (str(obj), e)
- return hexdigest(md5.new(contents).digest())
+ if not hasattr(obj, 'get_contents'):
+ raise AttributeError, "unable to fetch contents of '%s'" % str(obj)
+ return hexdigest(md5.new(str(obj.get_contents())).digest())
def to_string(signature):
"""Convert a signature to a string"""