mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
Fix python examples to use read-write conn
* docs/examples/python/domstart.py python/tests/create.py: The two example were broken as they needed full-access connection but only opened read-only connections
This commit is contained in:
parent
9fc567db7b
commit
813a2f683d
@ -32,7 +32,7 @@ if len(sys.argv) != 2:
|
|||||||
|
|
||||||
(name, xmldesc) = read_domain(sys.argv[1])
|
(name, xmldesc) = read_domain(sys.argv[1])
|
||||||
|
|
||||||
conn = libvirt.openReadOnly(None)
|
conn = libvirt.open(None)
|
||||||
if conn == None:
|
if conn == None:
|
||||||
print 'Failed to open connection to the hypervisor'
|
print 'Failed to open connection to the hypervisor'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -52,7 +52,7 @@ else:
|
|||||||
initrdU = "<initrd>" + initrdU + "</initrd>"
|
initrdU = "<initrd>" + initrdU + "</initrd>"
|
||||||
|
|
||||||
|
|
||||||
conn = libvirt.openReadOnly(None)
|
conn = libvirt.open(None)
|
||||||
if conn == None:
|
if conn == None:
|
||||||
print 'Failed to open connection to the hypervisor'
|
print 'Failed to open connection to the hypervisor'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user