Make subsystem requests die with a useful error.

wip-fakessh-exit-status
David Wilson 7 years ago
parent 4244a4609c
commit 8dad396e27

@ -282,7 +282,7 @@ def _fakessh_main(mitogen_, dest_context_id):
die('Missing hostname') die('Missing hostname')
for opt, optarg in opts: for opt, optarg in opts:
if 0 and opt == '-s': if opt == '-s':
subsystem = True subsystem = True
else: else:
LOG.debug('Warning option %s %s is ignored.', opt, optarg) 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('opts: %r', opts)
LOG.debug('args: %r', args) LOG.debug('args: %r', args)
if subsystem:
die('-s <subsystem> is not yet supported')
dest = mitogen.master.Context(mitogen_.router, dest_context_id) dest = mitogen.master.Context(mitogen_.router, dest_context_id)
control_handle, stdin_handle = dest.call_with_deadline(None, True, control_handle, stdin_handle = dest.call_with_deadline(None, True,
_start_slave, mitogen.context_id, args) _start_slave, mitogen.context_id, args)

Loading…
Cancel
Save