Hi Sandeep,

If that's your full Fabric script, then you are missing an import statement
and have an incorrect indentation in the statement after your function
definition.

Cheers,
Jens

Sent from my iPhone 5S

27 jun 2013 kl. 06:51 skrev Sandeep L <[email protected]>:

 Hi Andres,

Fllowing definition I am using and running command "fab append" is throwing
some errors.
Can you please correct me if there is any mistake in my definition.
*
*
*env.hosts=["localhost"]*
*def append():*
*        fabric.contrib.files.append("/home/sandeep/fabric/tmp/append",
"test")*


Thanks,
Sandeep.


> From: [email protected]
> Date: Wed, 26 Jun 2013 09:01:12 -0300
> Subject: Re: [Fab-user] Append out to a file in fabfile.py def()
> To: [email protected]
> CC: [email protected]
>
>
http://docs.fabfile.org/en/1.4.0/api/contrib/files.html#fabric.contrib.files.append
>
> On Wed, Jun 26, 2013 at 8:58 AM, Sandeep L <[email protected]>
wrote:
> > Hi,
> >
> > I am trying to append some text to a file using a simple definition with
> > fabric.
> > I tried following definition but not working, can someone please help me
> > resolve this issue.
> >
> > def file_append():
> > run("echo abc >> /home/user/test.txt")
> >
> > Also please let me know if there is any other way to achieve this using
> > fabric.
> >
> > Thanks,
> > Sandeep.
> >
> >
> > _______________________________________________
> > Fab-user mailing list
> > [email protected]
> > https://lists.nongnu.org/mailman/listinfo/fab-user
> >
>
>
>
> --
> Andrés Riancho
> Project Leader at w3af - http://w3af.org/
> Web Application Attack and Audit Framework
> Twitter: @w3af
> GPG: 0x93C344F3

_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to