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

Re: [virt-tools-list] [virt-manager PATCH v2] Avoid getting AttributeError when handling libvirt error



On 02/06/2013 09:51 PM, Cole Robinson wrote:
> On 02/05/2013 04:40 AM, Martin Kletzander wrote:
>> My python libvirt module doesn't have VIR_ERR_* inside itself and
>> according to some places in the code, this was already taken care of
>> by using the 'getattr' with safe default.  However, there were still
>> some places where this wasn't handled properly, so I tried to fixed it
>> by adding getattr for these attributes wherever 'git grep VIR_ERR'
>> found it.  While on that, I took the liberty of cleaning up some
>> related lines that were too long.
> 
> Like Dan said, we really only use getattr in the cases where an error
> code/flag value might be too new for some libvirt versions we still try and
> work with. So I won't apply this patch.
> 

Yes, I agree, the explanation came after I've already sent the v2.

> However maybe after the gtk3 port we can bump to a much more modern libvirt
> requirement on the virt-manager host.
> 

That sounds very reasonable.  Let me know if I can help somehow.

Martin


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