Re: [virt-manager PATCH 1/4] addhardware: use range to initialize page number

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

 



Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx> writes:

> Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>
> ---
>  virtManager/addhardware.py | 33 +++++++++++++++++----------------
>  1 file changed, 17 insertions(+), 16 deletions(-)
>
> diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
> index bd999cc..39ec63f 100644
> --- a/virtManager/addhardware.py
> +++ b/virtManager/addhardware.py
> @@ -42,22 +42,23 @@ from virtManager.storagebrowse import vmmStorageBrowser
>  from virtManager.baseclass import vmmGObjectUI
>  from virtManager.addstorage import vmmAddStorage
>  
> -PAGE_ERROR = 0
> -PAGE_DISK = 1
> -PAGE_NETWORK = 2
> -PAGE_INPUT = 3
> -PAGE_GRAPHICS = 4
> -PAGE_SOUND = 5
> -PAGE_HOSTDEV = 6
> -PAGE_CHAR = 7
> -PAGE_VIDEO = 8
> -PAGE_WATCHDOG = 9
> -PAGE_FILESYSTEM = 10
> -PAGE_SMARTCARD = 11
> -PAGE_USBREDIR = 12
> -PAGE_TPM = 13
> -PAGE_RNG = 14
> -PAGE_PANIC = 15
> +(PAGE_ERROR,
> +PAGE_DISK,
> +PAGE_NETWORK,
> +PAGE_INPUT,
> +PAGE_GRAPHICS,
> +PAGE_SOUND,
> +PAGE_HOSTDEV,
> +PAGE_CHAR,
> +PAGE_VIDEO,
> +PAGE_WATCHDOG,
> +PAGE_FILESYSTEM,
> +PAGE_SMARTCARD,
> +PAGE_USBREDIR,
> +PAGE_TPM,
> +PAGE_RNG,
> +PAGE_PANIC,
> +) = range(0, 16)

even if Emacs would format that differently (indenting with an empty
space), we use both styles in virt-manager and pylint doesn't complain,
so ACK.

Giuseppe

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux