textutils: python 2.6 compatibility fix

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>