Cope with python2 and python3 when generating etags