Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 1302a55

Browse files
committed
simplify not found message - it was overly complicated code
1 parent 45270f8 commit 1302a55

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

cli4/cli4.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,7 @@ def run_command(cf, method, command, params=None, content=None, files=None):
159159
cmd.append(element)
160160
except AttributeError:
161161
# the verb/element was not found
162-
if len(cmd) == 0:
163-
sys.stderr.write('cli4: /%s - not found\n' % (element))
164-
else:
165-
sys.stderr.write('cli4: /%s/%s - not found\n' % ('/'.join(cmd), element))
162+
sys.stderr.write('cli4: /%s - not found\n' % (command))
166163
raise e
167164

168165
if content and params:

0 commit comments

Comments
 (0)