fix python 2 (regression of 12d5bf52db2d1024cf79a9865c4e1bdaa5081944)