diff --git a/src/wormhole/cli/cli.py b/src/wormhole/cli/cli.py index 42e4608..f994478 100644 --- a/src/wormhole/cli/cli.py +++ b/src/wormhole/cli/cli.py @@ -8,7 +8,8 @@ from sys import stdout, stderr from . import public_relay from .. import __version__ from ..timing import DebugTiming -from ..errors import WrongPasswordError, WelcomeError, KeyFormatError +from ..errors import (WrongPasswordError, WelcomeError, KeyFormatError, + TransferError) from twisted.internet.defer import inlineCallbacks, maybeDeferred from twisted.python.failure import Failure from twisted.internet.task import react @@ -110,6 +111,9 @@ def _dispatch_command(reactor, cfg, command): print(file=stderr) print(str(e), file=stderr) raise SystemExit(1) + except TransferError as e: + print("TransferError: %s" % str(e), file=stderr) + raise SystemExit(1) except Exception as e: # this prints a proper traceback, whereas # traceback.print_exc() just prints a TB to the "yield"