Fix py24 bugs

Fix a couple of bugs that got in the latest libvirt related PRs