[libvirt] [Python] libvirt.libvirtError output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]