From 90aaab77fce2927a47b1f6ceca012d8ed3d399db Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 30 Jan 2021 16:42:25 +0100 Subject: [PATCH] fix linting issues --- nominatim/cli.py | 6 +++--- nominatim/errors.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nominatim/cli.py b/nominatim/cli.py index 487206c1..68d3cca8 100644 --- a/nominatim/cli.py +++ b/nominatim/cli.py @@ -92,11 +92,11 @@ class CommandlineParser: try: return args.command.run(args) - except UsageError as e: + except UsageError as exception: log = logging.getLogger() if log.isEnabledFor(logging.DEBUG): raise # use Python's exception printing - log.fatal('FATAL: ' + str(e)) + log.fatal('FATAL: %s', exception) # If we get here, then execution has failed in some way. return 1 @@ -124,7 +124,7 @@ def _osm2pgsql_options_from_args(args, default_cache, default_threads): # No need to document the functions each time. # pylint: disable=C0111 # Using non-top-level imports to make pyosmium optional for replication only. -# pylint: disable=C0415 +# pylint: disable=E0012,C0415 class SetupAll: diff --git a/nominatim/errors.py b/nominatim/errors.py index 80181aba..e77f956a 100644 --- a/nominatim/errors.py +++ b/nominatim/errors.py @@ -6,4 +6,3 @@ class UsageError(Exception): """ An error raised because of bad user input. This error will usually not cause a stack trace to be printed unless debugging is enabled. """ - pass -- 2.45.1