Fix python2 compatibility after 3249fd3

It would be nice to cut a 0.7 after this, a working python3 release is long due. Thanks