Python 3 fixes for python-jenkins