diff options
Diffstat (limited to 'src/engine/SCons/Sig/MD5.py')
-rw-r--r-- | src/engine/SCons/Sig/MD5.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/engine/SCons/Sig/MD5.py b/src/engine/SCons/Sig/MD5.py index 5239dab..c50dbb7 100644 --- a/src/engine/SCons/Sig/MD5.py +++ b/src/engine/SCons/Sig/MD5.py @@ -78,9 +78,11 @@ def collect(signatures): def signature(obj): """Generate a signature for an object """ - if not hasattr(obj, 'get_contents'): + try: + contents = str(obj.get_contents()) + except AttributeError: raise AttributeError, "unable to fetch contents of '%s'" % str(obj) - return hexdigest(md5.new(str(obj.get_contents())).digest()) + return hexdigest(md5.new(contents).digest()) def to_string(signature): """Convert a signature to a string""" |