Changeset 7013
- Timestamp:
- May 11, 2009, 4:18:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/utilities/system_tools.py
r6904 r7013 10 10 import getpass 11 11 import tarfile 12 import md5 12 try: 13 import hashlib 14 except ImportError: 15 import md5 as hashlib 13 16 14 17 … … 478 481 def get_file_hexdigest(filename, blocksize=1024*1024*10): 479 482 '''Get a hex digest of a file.''' 480 481 m = md5.new() 483 484 if hashlib.__name__ == 'hashlib': 485 m = hashlib.md5() # new - 'hashlib' module 486 else: 487 m = hashlib.new() # old - 'md5' module - remove once py2.4 gone 482 488 fd = open(filename, 'r') 483 489
Note: See TracChangeset
for help on using the changeset viewer.