python: simplify complicated conditional assignment

This commit is contained in:
Claudio Bley 2013-08-21 15:37:42 +02:00
parent 2a40951148
commit 8f3ead2da9

View File

@ -1455,8 +1455,7 @@ def buildWrappers(module):
elif classname in [ "virDomainSnapshot" ]: elif classname in [ "virDomainSnapshot" ]:
classes.write(" self._dom = dom\n") classes.write(" self._dom = dom\n")
classes.write(" self._conn = dom.connect()\n") classes.write(" self._conn = dom.connect()\n")
classes.write(" if _obj != None:self._o = _obj;return\n") classes.write(" self._o = _obj\n\n")
classes.write(" self._o = None\n\n")
destruct=None destruct=None
if classes_destructors.has_key(classname): if classes_destructors.has_key(classname):
classes.write(" def __del__(self):\n") classes.write(" def __del__(self):\n")