X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c3788d765ed4e7ddf00794085af757714bc102cf..896199c9d4f9252307b1068cbe94fa8aedfedcf8:/nominatim/cli.py diff --git a/nominatim/cli.py b/nominatim/cli.py index 0a3bd2b0..315c1cfe 100644 --- a/nominatim/cli.py +++ b/nominatim/cli.py @@ -70,7 +70,10 @@ class CommandlineParser: appropriate subcommand. """ args = NominatimArgs() - self.parser.parse_args(args=kwargs.get('cli_args'), namespace=args) + try: + self.parser.parse_args(args=kwargs.get('cli_args'), namespace=args) + except SystemExit: + return 1 if args.subcommand is None: self.parser.print_help()