WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Fix xm network-list/block-list/vtpm-list

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] Fix xm network-list/block-list/vtpm-list
From: Bastian Blank <bastian@xxxxxxxxxxxx>
Date: Thu, 22 Jun 2006 15:40:39 +0200
Delivery-date: Thu, 22 Jun 2006 06:41:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <16C695FEF1CD40kanno.masaki@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <16C695FEF1CD40kanno.masaki@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11+cvs20060403
> diff -r 411a3c01bb40 tools/python/xen/xm/main.py
> --- a/tools/python/xen/xm/main.py     Tue Jun 20 18:51:46 2006 +0100
> +++ b/tools/python/xen/xm/main.py     Thu Jun 22 15:50:35 2006 +0900
> @@ -276,7 +276,13 @@ for command in all_commands:
>  ####################################################################
>  
>  def arg_check(args, name, lo, hi = -1):
> -    n = len(args)
> +    # remove split(--) from args
> +    new_args = []
> +    for x in args:
> +        if x != '--':
> +            new_args.append(x)
> +
> +    n = len(new_args)

You don't mean "n = len([i for i in args if i != '--'])"?

Bastian

-- 
Extreme feminine beauty is always disturbing.
                -- Spock, "The Cloud Minders", stardate 5818.4

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel