From: Daniel P. Berrange Date: Thu, 24 Jan 2013 13:15:06 +0000 (+0000) Subject: Make python objects inherit from 'object' base class X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2349d51fbe28fbd3042d1c170091176145ceb890;p=libvirt.git 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 --- diff --git a/python/generator.py b/python/generator.py index f853d7749d..a079fc57f9 100755 --- a/python/generator.py +++ b/python/generator.py @@ -1413,7 +1413,7 @@ def buildWrappers(module): classes.write(" %s.__init__(self, _obj=_obj)\n\n" % ( classes_ancestor[classname])) else: - classes.write("class %s:\n" % (classname)) + classes.write("class %s(object):\n" % (classname)) if classname in [ "virDomain", "virNetwork", "virInterface", "virStoragePool", "virStorageVol", "virNodeDevice", "virSecret","virStream", "virNWFilter" ]: