Make b2387209 python 3.x compatible