Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv24066
Modified Files:
util.py
Log Message:
Optionally use fchksum for md5's for a increase in speed.
Index: util.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/util.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** util.py 14 Jun 2003 00:09:40 -0000 1.30
--- util.py 30 Jun 2003 05:07:09 -0000 1.31
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.31 2003/06/30 05:07:09 outlyer
+ # Optionally use fchksum for md5's for a increase in speed.
+ #
# Revision 1.30 2003/06/14 00:09:40 outlyer
# The "Smartsort" code. You can enable it in local_conf, it's disabled
***************
*** 264,278 ****
# we have to calculate it in this loop
def md5file(filename):
! m = md5.new()
try:
! f = open(filename, 'r')
! except IOError:
! print 'Cannot find file "%s"!' % filename
! return ''
! for line in f.readlines():
! m.update(line)
! f.close()
! return hexify(m.digest())
!
def resize(filename, x0=25, y0=25):
--- 267,287 ----
# we have to calculate it in this loop
def md5file(filename):
! # Try and use fchksum if installed
try:
! import fchksum
! if config.DEBUG: print "Using Optimized MD5 Routines from fchksum"
! return fchksum.fmd5t(filename)[0]
! except ImportError:
! if config.DEBUG: print "Falling back to Python MD5 routines"
! m = md5.new()
! try:
! f = open(filename, 'r')
! except IOError:
! print 'Cannot find file "%s"!' % filename
! return ''
! for line in f.readlines():
! m.update(line)
! f.close()
! return hexify(m.digest())
def resize(filename, x0=25, y0=25):
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog