Commit d3997dc2 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

pak_util: delete redundant error message code

This deletes a redundant block of code which manually checks arguments
(this is already done by the argparse module). This resolves a bug,
since this code references an undefined `actions` variable.

Bug: 960598
Test: tools/grit/pak_util.py # useful help output
Test: tools/grit/pak_util.py not-a-command # useful help output
Test: tools/grit/pak_util.py repack # useful help output
Change-Id: Idda7d8c16878c2cc99a1407eaeeb7c7d56f8d8d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1600605
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657583}
parent 0e0d4e2d
...@@ -137,13 +137,6 @@ def main(): ...@@ -137,13 +137,6 @@ def main():
help='The resource list path to write (default stdout)') help='The resource list path to write (default stdout)')
sub_parser.set_defaults(func=_ListMain) sub_parser.set_defaults(func=_ListMain)
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
elif len(sys.argv) == 2 and sys.argv[1] in actions:
parser.parse_args(sys.argv[1:] + ['-h'])
sys.exit(1)
args = parser.parse_args() args = parser.parse_args()
args.func(args) args.func(args)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment