Hi,

I have the following code working on libvirt 0.1.9:

########################################
conn = libvirt.openReadOnly(None)
            if conn == None:
                print 'Failed to open connection to the hypervisor'
                #sys.exit(1)

            try:
                domains = conn.listDomainsID()
                num  = conn.numOfDomains()
            except:
                print 'Failed to find the list of domains'

for i in range(num):
                try:
                    dom0 = conn.lookupByID(domains[i])
                    domInfo = dom0.info()
except:
                    print "Unexpected error:", sys.exc_info()

##############################################

For legacy reason, I have to get it working on libvirt 0.1.8 but I am constantly getting the following error:

Unexpected error: (<class libvirt.libvirtError at 0xb7f49f2c>, <libvirt.libvirtError instance at 0xb7f4f2cc>, <traceback object at 0xb7f44c5c>)

Any help would be much appreciated!

Cheers
Omer


--
----------------------------------------------------------  
CERN – European Organization for Nuclear
Research, IT Department,  CH-1211
Geneva 23, Switzerland

Phone: +41 (0) 22 767 2224
Fax:     +41 (0) 22 766 8683
E-mail : Omer.Khalid@cern.ch
Homepage: http://cern.ch/Omer.Khalid