Thanks; I committed this.
If anyone else is doing validate/assimilate in Python,
please test this change.
-- David

On 26-Aug-2014 1:45 PM, Bill Flynn wrote:
Apologies, that last patch and changes are wrong, although the original
source gives me errors still.  The problem is this:
Using Boinc.tools.get_output_file_path, md5.new raises a TypeError.

The even smaller only adds a try/except there to catch those and produce
the correct path.

Bill


On Tue, Aug 26, 2014 at 4:04 PM, Bill Flynn <[email protected]> wrote:

Hello,

I've started writing a custom assimilator/validator duo for my boinc
application.  I've been looking at the python tools, and it looks like the
md5 utilities located in

py/Boinc/tools.py

are not working properly.  Attached is a small patch that seems to work,
although the fix is pretty simple and the changes are included below so you
don't have to load up the patch to see them.  The patch was created from
the master branch, cloned 08/26/2014.

Thanks,
Bill


In md5_file (line 35), change lines 43-46

     try:
         checksum = md5()
     except NameError:
         checksum = md5.new()
to
     try:
         checksum = md5.new()
     except ValueError:
         checksum = md5.new('md5')


and in get_output_file_path (line 75), change line 81

     s = md5.new(filename).hexdigest()[1:8]
to
     try:
         s = md5.new(filename).hexdigest()[1:8]
     except ValueError:
         s = md5.new('md5', string=filename).hexdigest()[1:8]



_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to