mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
Fix connection lookup in python storage instances
* python/generator.py: patch from Cole Robinson trying to fix problem of connection lookup when creating storage instances Daniel
This commit is contained in:
parent
52efa8863e
commit
3c487a4229
@ -1,3 +1,8 @@
|
|||||||
|
Tue Aug 12 10:09:23 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
|
* python/generator.py: patch from Cole Robinson trying to fix
|
||||||
|
problem of connection lookup when creating storage instances
|
||||||
|
|
||||||
Tue Aug 12 10:04:33 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
Tue Aug 12 10:04:33 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
* po/*: regeneration of pot file, updates of .po
|
* po/*: regeneration of pot file, updates of .po
|
||||||
|
@ -962,8 +962,12 @@ def buildWrappers():
|
|||||||
list = reference_keepers[classname]
|
list = reference_keepers[classname]
|
||||||
for ref in list:
|
for ref in list:
|
||||||
classes.write(" self.%s = None\n" % ref[1])
|
classes.write(" self.%s = None\n" % ref[1])
|
||||||
if classname in [ "virDomain", "virNetwork", "virStoragePool", "virStorageVol" ]:
|
if classname in [ "virDomain", "virNetwork" ]:
|
||||||
classes.write(" self._conn = conn\n")
|
classes.write(" self._conn = conn\n")
|
||||||
|
elif classname in [ "virStorageVol", "virStoragePool" ]:
|
||||||
|
classes.write(" self._conn = conn\n" + \
|
||||||
|
" if not isinstance(conn, virConnect):\n" + \
|
||||||
|
" self._conn = conn._conn\n")
|
||||||
classes.write(" if _obj != None:self._o = _obj;return\n")
|
classes.write(" if _obj != None:self._o = _obj;return\n")
|
||||||
classes.write(" self._o = None\n\n");
|
classes.write(" self._o = None\n\n");
|
||||||
destruct=None
|
destruct=None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user