[6.8.0] virDomainSnapshot class init - undefined variable
It is not possible to create snapshot because during the virDomainSnapshot class initialization there is an undefined variable.
See traceback:
Traceback (most recent call last):
File "/tmp/scap-security-guide-0.1.53/tests/ssg_test_suite/virt.py", line 38, in create
self.CREATE_FLAGS)
File "/usr/local/lib64/python3.6/site-packages/libvirt.py", line 2830, in snapshotCreateXML
__tmp = virDomainSnapshot(self, _obj=ret)
File "/usr/local/lib64/python3.6/site-packages/libvirt.py", line 6628, in __init__
self._dom = dom
NameError: name 'dom' is not defined
6.7.0:
class virDomainSnapshot(object):
def __init__(self, dom, _obj=None):
self._dom = dom
self._conn = dom.connect()
if type(_obj).__name__ not in ["PyCapsule", "PyCObject"]:
raise Exception("Expected a wrapped C Object but got %s" % type(_obj))
self._o = _obj
6.8.0:
class virDomainSnapshot(object):
def __init__(self, net, _obj=None):
self._dom = dom
self._conn = dom.connect()
if type(_obj).__name__ not in ["PyCapsule", "PyCObject"]:
raise Exception("Expected a wrapped C Object but got %s" % type(_obj))
self._o = _obj
Parameter name has been changed but the code in initialization did not.