Comment 1 for bug 455220

Revision history for this message
Hugo Santos (Factorlibre) (hugosantosred) wrote :

Hi, I found this problem too in a centos server, as you say is related to python2.4 that haven't that method.

I made a homemade solution that consist in introduce the function partition in all the files that uses it.

The function is:

def partition(self, cad, sep):
    num = cad.find(sep)
    if num:
        c1 = cad[0:num]
        c2 = cad[num:num+1]
        c3 = cad[num+1:len(cad)]
        cadena = [c1, c2, c3]
        return cadena
    else:
        return cad

Then you have to change all the calls to the function from field.partition('/')[0] to self.partition(field,'/')[0]