Python Fabric: Skip logins needing passwords

后端 未结 2 1690
[愿得一人]
[愿得一人] 2021-01-22 16:07

I have a similar issue to this: How can I skip Fabric connections that ask for a password? which has no answer. I\'m looking for a way to get Fabric to consider bad any host ask

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-22 16:41

    I just patched up the utils.py in fabric to return a raise instead of sys.exit(1). let's you handle it cleanly instead of it crapping itself.

    (about line 34)
        else:
            #sys.exit(1)
            raise("I broke")
    

提交回复
热议问题