mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-12-16 12:24:29 +03:00
* python/libvir.c: call the initialize entry point
* src/libvirt_sym.version: add initialize entry point * src/libvirt.c: make sure we always initialize the lib * python/tests/*.py: start updating exemple for exception handling as pointed by Jim Meyering Daniel
This commit is contained in:
@@ -14,8 +14,9 @@ if conn == None:
|
||||
|
||||
# print conn
|
||||
|
||||
dom0 = conn.lookupByName("Domain-0")
|
||||
if dom0 == None:
|
||||
try:
|
||||
dom0 = conn.lookupByName("Domain-0")
|
||||
except:
|
||||
print 'Failed to find the main domain'
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user