Hi,

I was planning on upgrading to a recent version of lxml but found that our code was failing in numerous places with None objects found in unexpected places. 
In lxml 2+ the findtext method will ignore the default and return None if the element is found but the text is empty.
In elementtree and lxml before 2 the findtext method would never return None, if the element is found but empty it would return the default.

Unfortunately I am unable to tell which exact version of lxml introduced that change. And I am not sure if this change is by design, but I would say it is not.

A proposed fix (if it is a bug...) is included in the attached unified diff.

Cheers,

Aloys
--
Aloys Baillet
Research & Development - Animal Logic
--