From ff9c81722ae7221364e9bcb83d98b16b4263334e Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Fri, 13 Aug 2021 16:01:45 -0700 Subject: [PATCH] try/except for shlex.join since only available in python 3.8 --- jc/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jc/cli.py b/jc/cli.py index 5c35d9a7..9bd8f7ec 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -548,7 +548,10 @@ def main(): # if magic syntax used, try to run the command and error if it's not found, etc. magic_stdout, magic_stderr, magic_exit_code = None, None, 0 if run_command: - run_command_str = shlex.join(run_command) + try: + run_command_str = shlex.join(run_command) # python 3.8+ + except AttributeError: + run_command_str = join(run_command) # older python versions if valid_command: try: