make the error message for the cli a bit more specific
This commit is contained in:
parent
bc7dea8bab
commit
65713d8652
|
@ -60,6 +60,9 @@ def run(reactor, argv, cwd, stdout, stderr, executable=None):
|
||||||
print(msg, file=stderr)
|
print(msg, file=stderr)
|
||||||
print(file=stderr)
|
print(file=stderr)
|
||||||
print(str(f.value), file=stderr)
|
print(str(f.value), file=stderr)
|
||||||
|
elif f.check(KeyFormatError):
|
||||||
|
msg = textwrap.fill("ERROR: " + textwrap.dedent(f.value.__doc__))
|
||||||
|
print(msg, file=stderr)
|
||||||
else:
|
else:
|
||||||
print("ERROR:", f.value, file=stderr)
|
print("ERROR:", f.value, file=stderr)
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
|
|
@ -39,7 +39,8 @@ class WrongPasswordError(Exception):
|
||||||
class KeyFormatError(Exception):
|
class KeyFormatError(Exception):
|
||||||
"""
|
"""
|
||||||
The key you entered contains spaces. Magic-wormhole expects keys to be
|
The key you entered contains spaces. Magic-wormhole expects keys to be
|
||||||
separated by dashes.
|
separated by dashes. Please reenter the key you were given separating the
|
||||||
|
words with dashes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class ReflectionAttack(Exception):
|
class ReflectionAttack(Exception):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user