summaryrefslogtreecommitdiffstats
path: root/lib/pp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pp.rb')
0 files changed, 0 insertions, 0 deletions
ctxt, err) errno = err libvirt.registerErrorHandler(handler, 'context') conn = libvirt.openReadOnly(None) if conn == None: print 'Failed to open connection to the hypervisor' sys.exit(1) try: dom0 = conn.lookupByName("Does_not_exist") print 'strange found a Does_not_exist domain' sys.exit(1) except: pass del conn if errno == None: print 'failed to get an error' elif errno[0] == libvirt.VIR_ERR_NO_CONNECT or \ errno[0] == libvirt.VIR_ERR_INVALID_DOMAIN or \ errno[0] == libvirt.VIR_ERR_GET_FAILED: print "OK" else: print 'got unexpected error:', errno sys.exit(0)