From 29e4487d6ad1d035de31343e1d2db4953bd81c73 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 20 Sep 2017 15:05:39 +0530 Subject: [PATCH] Make subsystem requests die with a useful error. --- mitogen/fakessh.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mitogen/fakessh.py b/mitogen/fakessh.py index 00a9cd03..66bad698 100644 --- a/mitogen/fakessh.py +++ b/mitogen/fakessh.py @@ -282,7 +282,7 @@ def _fakessh_main(mitogen_, dest_context_id): die('Missing hostname') for opt, optarg in opts: - if 0 and opt == '-s': + if opt == '-s': subsystem = True else: LOG.debug('Warning option %s %s is ignored.', opt, optarg) @@ -291,6 +291,9 @@ def _fakessh_main(mitogen_, dest_context_id): LOG.debug('opts: %r', opts) LOG.debug('args: %r', args) + if subsystem: + die('-s is not yet supported') + dest = mitogen.master.Context(mitogen_.router, dest_context_id) control_handle, stdin_handle = dest.call_with_deadline(None, True, _start_slave, mitogen.context_id, args)