I install invoke from pip, then i get this error:

TypeError: run() got an unexpected keyword argument 'watchers'

I need to import something else?

best regards i still reading ...



On Fri, Jun 15, 2018 at 11:45 AM Emiliano Vazquez <emilianovazq...@gmail.com>
wrote:

> thanks i will checkout right now!
>
>
>
> On Fri, Jun 15, 2018 at 11:39 AM Brandon Whaley <redkr...@gmail.com>
> wrote:
>
>> I think you may be able to use su by setting up a watcher for su's
>> password prompt and using su -c "command" via run:
>>
>> http://docs.pyinvoke.org/en/latest/concepts/watchers.html#autoresponding
>>
>>     responder = Responder(
>>         pattern=r"Password: ",
>>         response="thisismysecretpassword",
>>     )
>>     c.run("su -c 'something-that-needs-root'", watchers=[responder])
>>
>>
>> On Fri, Jun 15, 2018 at 9:19 AM Emiliano Vazquez <
>> emilianovazq...@gmail.com> wrote:
>>
>>> Hi guys. I'm stuck on this.
>>>
>>> I have some debian boxes without sudo and only my user working.
>>>
>>> Today i do this:
>>> 1. Login to box as "myuser"
>>> 2.  *$su *-
>>> 3. Ask for the root password (diferent from myuser password)
>>> 4. I got root  => *#*
>>>
>>> I can't make it work with fabric.
>>>
>>> sudo('sh /tmp/myscript.sh') did not work
>>>
>>> I read about using expect but i don't know if this is the "python way"
>>> to do this.
>>>
>>> Any hint will be apreciatted
>>>
>>> Emiliano
>>>
>>>
>>>
>>> _______________________________________________
>>> Fab-user mailing list
>>> Fab-user@nongnu.org
>>> https://lists.nongnu.org/mailman/listinfo/fab-user
>>>
>>
_______________________________________________
Fab-user mailing list
Fab-user@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to