keep it compatible with python 2.6

Small piece of code to keep it python2.6 compliant.