summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2013-01-24 13:15:06 +0000
committerDaniel P. Berrange <berrange@redhat.com>2013-01-24 14:13:26 +0000
commitd9a4428e4485719d2945d0e6b35e9efc412d2a2e (patch)
tree57e29deedd7b4bd8771ea07df5eee4a32f681eaf
parent6d36e1dd94071cb6eb6d6148b369d52a63694124 (diff)
downloadlibvirt-python-split-d9a4428e4485719d2945d0e6b35e9efc412d2a2e.tar.gz
libvirt-python-split-d9a4428e4485719d2945d0e6b35e9efc412d2a2e.tar.xz
libvirt-python-split-d9a4428e4485719d2945d0e6b35e9efc412d2a2e.zip
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>
-rwxr-xr-xgenerator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator.py b/generator.py
index f853d77..a079fc5 100755
--- a/generator.py
+++ b/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" ]: