Then I suggest the whitespace errors are fixed FIRST and then the patch is applied.
I will have a look on friday (as usual) then I will have time. I will try to clean up the whitespace issues as well, as far as I am able, because my Python knowledge is limited.
Maybe by that time there already is a newer version?
Erik, in the .py I posted above the double indent error has been rectified. Just need to test in PLi before commiting.