tools: ratbagctl: skip on AttributeError exception handling for --help
We default to False anyway, so it's guaranteed to be an attribute on the
parser
@@ -1283,7 +1283,7 @@ class RatbagParserRoot(object):
add_help=False)
self.parser.add_argument("-V", "--version", action="version", version="@version@")
self.parser.add_argument('--verbose', '-v', action='count', default=0)
- self.parser.add_argument('--help', '-h', action='store_true', default=0)
+ self.parser.add_argument('--help', '-h', action='store_true', default=False)
ns, rest = self.parser.parse_known_args(input_string)
@@ -1346,12 +1346,9 @@ def main(argv):
parser = get_parser()
cmd = parser.parse(argv)
- try:
if cmd.help:
parser.print_help()
return
- except AttributeError:
- pass
r = open_ratbagd()
if r is not None:
