CLI: made some python3 compatibility effort