[libvirt] [PATCH python v2] generator: Remove use of 'has_key' function