From: Masaki Kanno Subject: Re: [PATCH][RESEND] Add syntax checking for xmblock-attach Date: Mon, 11 Sep 2006 10:12:10 +0900 Message-ID: <20C6D53F4E5255kanno.masaki@jp.fujitsu.com> References: <16C6D2E6799A23kanno.masaki@jp.fujitsu.com> <1157728396.26967.12.camel@basalt.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1157728396.26967.12.camel@basalt.austin.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Hollis Blanchard Cc: xen-devel@lists.xensource.com, ewan@xensource.com List-Id: xen-devel@lists.xenproject.org >On Fri, 2006-09-08 at 10:31 +0900, Masaki Kanno wrote: >> + # 'r' : read-only mode >> + # 'w' : read-write mode >> + # 'w!' : read-write and it is safe to have multiple writers on >> this device >> + mode = sxp.child_value(config, 'mode', 'r') >> + if mode != 'r' and mode != 'w' and mode != 'w!': >> + raise VmError('Invalid mode') > >I don't think the comments are necessary; those are pretty standard. > >Also, try this for your test: > if mode not in ('r', 'w', 'w!'): > raise VmError('Invalid mode') Hi Hollis, Thanks for your comments and example codes. Best regards, Kan > >-- >Hollis Blanchard >IBM Linux Technology Center > > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel