Skip to content

Commit

Permalink
simplify not found message - it was overly complicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Nov 8, 2022
1 parent 45270f8 commit 1302a55
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cli4/cli4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1302a55

Please sign in to comment.