Update of /cvsroot/webware/Webware/MiscUtils
In directory usw-pr-cvs1:/tmp/cvs-serv7238/MiscUtils
Modified Files:
Funcs.py
Log Message:
fixing Python 1.5.2 incompatibilities
Index: Funcs.py
===================================================================
RCS file: /cvsroot/webware/Webware/MiscUtils/Funcs.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Funcs.py 2001/11/12 12:18:18 1.9
--- Funcs.py 2001/11/19 16:46:04 1.10
***************
*** 102,106 ****
if forObject is not None:
r.append(id(forObject))
! return md5.new(str(r)).hexdigest()
--- 102,114 ----
if forObject is not None:
r.append(id(forObject))
! md5object = md5.new(str(r))
! try:
! return md5object.hexdigest()
! except AttributeError:
! # Older versions of Python didn't have hexdigest, so we'll do it manually
! hexdigest = []
! for char in md5object.digest():
! hexdigest.append('%02x' % ord(char))
! return string.join(hexdigest, '')
|