From 2b047f0525c41a7b5d77f69463543e503caccf10 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Mon, 15 Feb 2016 20:38:34 +0200 Subject: [PATCH] main: refactor shell flag --- trezor_agent/__main__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trezor_agent/__main__.py b/trezor_agent/__main__.py index df3024d..d215ab0 100644 --- a/trezor_agent/__main__.py +++ b/trezor_agent/__main__.py @@ -106,13 +106,13 @@ def run_agent(client_factory): public_key = conn.get_public_key(label=label) - use_shell = False if args.connect: command = ssh_args(label) + args.command log.debug('SSH connect: %r', command) - if args.shell: - command, use_shell = os.environ['SHELL'], True + use_shell = bool(args.shell) + if use_shell: + command = os.environ['SHELL'] log.debug('using shell: %r', command) if not command: