fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] when password is wrong


From: Prasant J
Subject: Re: [Fab-user] when password is wrong
Date: Tue, 13 Dec 2016 19:20:50 +0530

Thanks Brandon for the response!


I'm using fabric as library in my program.
I'm setting up environment first (env.user, env.password) and then
using run() to execute the command.

How can I set "abort-on-prompts" in this case? (I know how to use from
command line)

Could you please point me to an example or provide some inputs so that
I can use this feature?

Regards, Pj


On Mon, Dec 5, 2016 at 8:38 PM, Brandon Whaley <address@hidden> wrote:
> I would use a combination of
> http://docs.fabfile.org/en/1.12/usage/env.html#abort-on-prompts and
> http://docs.fabfile.org/en/1.12/usage/env.html#abort-exception to have
> Fabric throw a custom exception when it has to prompt, which I would
> subsequently catch and handle myself based on context.
>
> On Mon, Dec 5, 2016 at 1:12 AM Prasant J <address@hidden> wrote:
>>
>> Hi,
>>
>> I'm writing a python GUI that uses fabric as library and performs
>> operations on the remote host.
>>
>> When the user supplies wrong password, then fabric asks for user to
>> provide password on the command line. The control drops to the command
>> line and the prompt is expecting user to input the password and this
>> does not go well with my GUI application.
>>
>> How can I prevent this? How can fabric return exception or error when
>> password supplied is wrong. Basically fabric should give up on the
>> first attempt when password is incorrect.
>>
>> Is there any way around this?
>>
>> Any inputs will be of help!
>>
>>
>> Regards, Pj
>>
>> _______________________________________________
>> Fab-user mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/fab-user



reply via email to

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