Mercurial > fife-parpg
changeset 690:9dce3dbd4fa9
Applying patch to get rid of md5 warning message when running scons.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Tue, 19 Apr 2011 16:13:37 +0000 |
parents | f67e9f47526d |
children | 883dbf45afc9 ca1fcb96907d |
files | utils/util_scripts/path.py |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/utils/util_scripts/path.py Thu Mar 31 02:56:16 2011 +0000 +++ b/utils/util_scripts/path.py Tue Apr 19 16:13:37 2011 +0000 @@ -29,7 +29,14 @@ from __future__ import generators -import sys, warnings, os, fnmatch, glob, shutil, codecs, md5 +import sys, warnings, os, fnmatch, glob, shutil, codecs + +try: + # Python 2.5 or higher + from hashlib import md5 +except ImportError: + # Python 2.4 or lower + from md5 import new as md5 __version__ = '2.2' __all__ = ['path'] @@ -767,7 +774,7 @@ """ f = self.open('rb') try: - m = md5.new() + m = md5() while True: d = f.read(8192) if not d: