]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/check_database.py
fix return code for check database run with 'not applicable'
[nominatim.git] / nominatim / tools / check_database.py
index e99a3572d49553b28eee6ca3b14f7baf93c55fa7..7b8da200b5a8598416bb9ef78f76dc3eda8347a5 100644 (file)
@@ -70,7 +70,7 @@ def check_database(config):
         if ret == CheckState.FATAL:
             conn.close()
             return 1
-        if ret != CheckState.OK:
+        if ret in (CheckState.FATAL, CheckState.FAIL):
             overall_result = 1
 
     conn.close()
@@ -154,6 +154,7 @@ def check_placex_size(conn, config): # pylint: disable=W0613
 
     return CheckState.OK if cnt > 0 else CheckState.FATAL
 
+
 @_check(hint="""\
              The Postgresql extension nominatim.so was not correctly loaded.
 
@@ -198,13 +199,12 @@ def check_indexing(conn, config): # pylint: disable=W0613
         # Likely just an interrupted update.
         index_cmd = 'nominatim index'
     else:
-        # Looks like the import process got interupted.
+        # Looks like the import process got interrupted.
         index_cmd = 'nominatim import --continue indexing'
 
     return CheckState.FAIL, dict(count=cnt, index_cmd=index_cmd)
 
 
-
 @_check(hint="""\
              The following indexes are missing:
                {indexes}