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

[libvirt] [Python] libvirt.libvirtError output



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.

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