mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Make python objects inherit from 'object' base class
As of python >= 2.2, it is recommended that all objects inherit from the 'object' base class. We already require python >= 2.3 for libvirt for thread macro support, so we should follow this best practice. See also http://stackoverflow.com/questions/4015417/python-class-inherits-object Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
d200363ee6
commit
2349d51fbe
@ -1413,7 +1413,7 @@ def buildWrappers(module):
|
|||||||
classes.write(" %s.__init__(self, _obj=_obj)\n\n" % (
|
classes.write(" %s.__init__(self, _obj=_obj)\n\n" % (
|
||||||
classes_ancestor[classname]))
|
classes_ancestor[classname]))
|
||||||
else:
|
else:
|
||||||
classes.write("class %s:\n" % (classname))
|
classes.write("class %s(object):\n" % (classname))
|
||||||
if classname in [ "virDomain", "virNetwork", "virInterface", "virStoragePool",
|
if classname in [ "virDomain", "virNetwork", "virInterface", "virStoragePool",
|
||||||
"virStorageVol", "virNodeDevice", "virSecret","virStream",
|
"virStorageVol", "virNodeDevice", "virSecret","virStream",
|
||||||
"virNWFilter" ]:
|
"virNWFilter" ]:
|
||||||
|
Loading…
Reference in New Issue
Block a user