[libvirt] [Python] libvirt.libvirtError output
Ivan Vovk
ivovk at intermedia.net
Tue Dec 9 20:22:37 UTC 2008
Hello,
i have the following piece of pyhton test code:
try:
dom = conn.createXML(xmldata, 0)
except libvirt.libvirtError, le:
sys.stderr.write(le.message)
as a result in case of exception i get 2 outputs in stderr:
libvir: OpenVZ error : operation failed: Already an OPENVZ VM defined with the id '3005'
operation failed: Already an OPENVZ VM defined with the id '3005'
Actually, i just need only second string, which is generated by sys.stderr.write(le.message).
Can an exception be raised without "uncontrolled" direction to stderr (fisrt string)?
________________________________
This message (including attachments) is private and confidential. If you have received this message in error, please notify us and remove it from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20081209/2c53aa5e/attachment-0001.htm>
More information about the libvir-list
mailing list