Fix python 3 compatability with 'esearch -e' (Bug 469076)

Thanks to zmedico for the patch.