Fix python2 breakage caused by e5e044da87800feb6ef63fef1765d8c05022d926.