Skip to content
Snippets Groups Projects
Commit d73f67cc authored by neodarz's avatar neodarz Committed by Eliot Berriot
Browse files

Cryptfile exception handling

parent 1c936f6b
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,12 @@ def set_server(ctx, url, token):
parsed = urllib.parse.urlparse(url)
ctx.obj["SERVER_NETLOC"] = parsed.netloc
ctx.obj["SERVER_PROTOCOL"] = parsed.scheme
try:
token = token or keyring.get_password(url, "_")
except ValueError as e:
raise click.ClickException("Error while retrieving password from keyring: {}. Your password may be incorrect.".format(e.args[0]))
except Exception as e:
raise click.ClickException("Error while retrieving password from keyring: {}".format(e.args[0]))
ctx.obj["remote"] = api.get_api(
domain=ctx.obj["SERVER_NETLOC"],
protocol=ctx.obj["SERVER_PROTOCOL"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment