py2 compatible

Signed-off-by: ehs2013 <xiaodong.que+github@gmail.com>