From 1302a5587aa80f046687c41b0e32f5954c31a90c Mon Sep 17 00:00:00 2001 From: Martin Levy Date: Tue, 8 Nov 2022 11:44:37 -0800 Subject: [PATCH] simplify not found message - it was overly complicated code --- cli4/cli4.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cli4/cli4.py b/cli4/cli4.py index 92f6eb8..e61f29b 100644 --- a/cli4/cli4.py +++ b/cli4/cli4.py @@ -159,10 +159,7 @@ def run_command(cf, method, command, params=None, content=None, files=None): cmd.append(element) except AttributeError: # the verb/element was not found - if len(cmd) == 0: - sys.stderr.write('cli4: /%s - not found\n' % (element)) - else: - sys.stderr.write('cli4: /%s/%s - not found\n' % ('/'.join(cmd), element)) + sys.stderr.write('cli4: /%s - not found\n' % (command)) raise e if content and params: