MCPcopy Index your code
hub / github.com/pyinvoke/invoke / AuthFailure

Class AuthFailure

invoke/exceptions.py:170–188  ·  view source on GitHub ↗

An authentication failure, e.g. due to an incorrect ``sudo`` password. .. note:: `.Result` objects attached to these exceptions typically lack exit code information, since the command was never fully executed - the exception was raised instead. .. versionadded:

Source from the content-addressed store, hash-verified

168
169
170class AuthFailure(Failure):
171 """
172 An authentication failure, e.g. due to an incorrect ``sudo`` password.
173
174 .. note::
175 `.Result` objects attached to these exceptions typically lack exit code
176 information, since the command was never fully executed - the exception
177 was raised instead.
178
179 .. versionadded:: 1.0
180 """
181
182 def __init__(self, result: "Result", prompt: str) -> None:
183 self.result = result
184 self.prompt = prompt
185
186 def __str__(self) -> str:
187 err = "The password submitted to prompt {!r} was rejected."
188 return err.format(self.prompt)
189
190
191class ParseError(Exception):

Callers 1

_sudoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…