Re: [PATCH python] Fix code for avoiding overrides of non-existant functions

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

 



On 11/27/2013 04:14 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> When reading/writing a global variable from inside a method
> it must be declared as a global, otherwise a local variable
> by the same name will be used.
> 
> Special case the virConnectListDomainsID method which is
> bizarrely renamed for no obvious reason.

It's such an old binding (predates my time on libvirt), but I suspect it
may have been done with the foresight that returning a list of integer
ids is not as useful as a list of python objects; if nothing else, it
means that connect.ListDomains is still available as a shorter name than
connect.ListDomainsAll for our newer APIs that return objects to begin with.

> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  generator.py | 6 ++++++
>  1 file changed, 6 insertions(+)

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]