es.py fixes to preserve Python2 compatibility
es.py fixes to preserve Python2 compatibility

HackLinux/pyes,HackLinux/pyes,HackLinux/pyes,aparo/pyes,Fiedzia/pyes,Fiedzia/pyes,haiwen/pyes,aparo/pyes,jayzeng/pyes,aparo/pyes,haiwen/pyes,haiwen/pyes,mavarick/pyes,Fiedzia/pyes,jayzeng/pyes,mavarick/pyes,mavarick/pyes,jayzeng/pyes