X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c4f22a42eba499ed1854c5967b2e3932fe9b3896..fdd20a76bdba7b1115361e337aff661ed830b11f:/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()