fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] Simplified argument passed to a function?


From: Jeff Forcier
Subject: Re: [Fab-user] Simplified argument passed to a function?
Date: Fri, 14 Nov 2008 08:29:47 -0500

I'm pretty sure this is because the current argument parsing code only
does keyword args, but I'm also pretty sure there's no big reason why
it cannot be extended to support args too. I'll make sure we at least
have this as a todo item, after checking to make sure it's not already
in with some sort of alternate syntax than what you tried (or broken).

-Jeff

On Fri, Nov 14, 2008 at 8:16 AM, Nick Sergeant <address@hidden> wrote:
> Right now, my function is this:
> def deploy(**kwargs):
> ...Some stuff...
>
> I call the function like:
> fab deploy:m='my subversion commit message'
> However, it would be useful to simply call it like:
> fab deploy:'my subversion committ message'
> ... if it is safe to assume I only need one argument (the commit message).
> Yet, when I set the function up like this:
> def deploy(m):
> ...Some stuff...
>
> and call it like:
> fab deploy:'my subversion commit message'
> I get:
> TypeError: deploy() got an unexpected keyword argument 'my subversion commit
> message'
> Thanks!
> Nick Sergeant
> www.nicksergeant.com
> address@hidden
> (315) 719-2047
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]