Attempting to port to python2 for compatibility with libvirt