Skip to content

Commit

Permalink
perf: Remove unwanted check (frappe#788)
Browse files Browse the repository at this point in the history
`get_frappe_commands` returns a list of valid frappe commands which is used to check if the user command is valid. But this is unnecessary because even without it bench can report the command not found error. This saves ~1 second.
  • Loading branch information
surajshetty3416 authored and netchampfaris committed Apr 12, 2019
1 parent 2435cb6 commit 431e969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bench/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def cli():
if len(sys.argv) > 2 and sys.argv[1] == "frappe":
return old_frappe_cli()

elif len(sys.argv) > 1 and sys.argv[1] in get_frappe_commands():
elif len(sys.argv) > 1:
return frappe_cmd()

elif len(sys.argv) > 1 and sys.argv[1] in ("--site", "--verbose", "--force", "--profile"):
Expand Down

0 comments on commit 431e969

Please sign in to comment.