]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/config.py
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / nominatim / config.py
index 1db564938c78479c19107082be204c17bbb53c15..a8436440b9f5ca78670ba9fe9e1cc8e3979ece96 100644 (file)
@@ -39,7 +39,7 @@ class Configuration:
             self._config['NOMINATIM_ADDRESS_LEVEL_CONFIG'] = \
                 str(config_dir / 'address-levels.json')
 
             self._config['NOMINATIM_ADDRESS_LEVEL_CONFIG'] = \
                 str(config_dir / 'address-levels.json')
 
-        class _LibDirs: # pylint: disable=too-few-public-methods
+        class _LibDirs:
             pass
 
         self.lib_dir = _LibDirs()
             pass
 
         self.lib_dir = _LibDirs()
@@ -68,9 +68,9 @@ class Configuration:
         """
         try:
             return int(self.__getattr__(name))
         """
         try:
             return int(self.__getattr__(name))
-        except ValueError:
+        except ValueError as exp:
             LOG.fatal("Invalid setting NOMINATIM_%s. Needs to be a number.", name)
             LOG.fatal("Invalid setting NOMINATIM_%s. Needs to be a number.", name)
-            raise UsageError("Configuration error.")
+            raise UsageError("Configuration error.") from exp
 
 
     def get_libpq_dsn(self):
 
 
     def get_libpq_dsn(self):