summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Bley <cbley@av-test.de>2013-08-21 15:37:42 +0200
committerClaudio Bley <cbley@av-test.de>2013-08-23 10:54:58 +0200
commit1f01027098786ad96ddccdf6e6a076b917cce77f (patch)
tree286f55785f6ec54533e1efc474a8f4368fa1002d
parentd101d3bce8c59583c5713215b6a7fb2f7376a1fc (diff)
downloadlibvirt-python-split-1f01027098786ad96ddccdf6e6a076b917cce77f.zip
libvirt-python-split-1f01027098786ad96ddccdf6e6a076b917cce77f.tar.gz
libvirt-python-split-1f01027098786ad96ddccdf6e6a076b917cce77f.tar.xz
python: simplify complicated conditional assignmentv1.1.2-rc1
-rwxr-xr-xgenerator.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/generator.py b/generator.py
index 6c7414a..fb321c6 100755
--- a/generator.py
+++ b/generator.py
@@ -1455,8 +1455,7 @@ def buildWrappers(module):
elif classname in [ "virDomainSnapshot" ]:
classes.write(" self._dom = dom\n")
classes.write(" self._conn = dom.connect()\n")
- classes.write(" if _obj != None:self._o = _obj;return\n")
- classes.write(" self._o = None\n\n")
+ classes.write(" self._o = _obj\n\n")
destruct=None
if classes_destructors.has_key(classname):
classes.write(" def __del__(self):\n")