more fixes for python3

Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>