diff options
author | Steven Knight <knight@baldmt.com> | 2002-04-15 18:43:38 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-04-15 18:43:38 (GMT) |
commit | a8176f609ff3ecc090f51830408d3b4dc6338d7e (patch) | |
tree | bab059042f2f8cbc85dcf7a619dbebbbe23dc4fb /src/engine/SCons/Sig/MD5.py | |
parent | 05029e336146444501a66b53e4699c09d6e08977 (diff) | |
download | SCons-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.py | 9 |
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""" |