On 12-Jul-07, at 6:33 AM, vanderkerkoff wrote:
I/my boss and me worked it out.
The delete funtion in solr.py looks like this
def delete(self, id):
xstr = '<delete><id>'+self.escapeVal(`id`)+'</id></delete>'
return self.doUpdateXML(xstr)
As we're not passing an integer it get's all c*nty booby, technical
term.
So if I rewrite the delete to be like this
def delete(self, id):
xstr = '<delete><id>'+ id + '</id></delete>'
print xstr
return self.doUpdateXML(xstr)
It works fine.
There's no need for escapeVal, as I know the words I'll be sending
prior to
the ID, in fact, I'm not sure why escapeVal is in there at all if
you can't
send it non integer values.
Maybe someone can enlighten us.
I would suggest replacing it with
self.escapeVal(unicode(id))
backticks are equivalent to repr(), which does the wrong thing for
strings.
-Mike