Make it work on Python 3

Change-Id: Ia8eedf699e988a199520c48e21c9731af912003c