Skip to content

Commit

Permalink
Merge pull request #2346 from stveit/bugfix.config-error
Browse files Browse the repository at this point in the history
log warning if DATABASES cannot be defined
lunkwill42 authored Feb 22, 2022
2 parents 2da4bef + b9b44e5 commit e4e08ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/nav/django/settings.py
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
import os
import sys
import copy
import warnings

import django
from django.utils.log import DEFAULT_LOGGING
@@ -66,8 +67,8 @@
},
}
}
except (IOError, OSError):
pass
except (IOError, OSError) as e:
warnings.warn(f"Could not get connection parameters from db.conf: {e}")

# URLs configuration
ROOT_URLCONF = 'nav.django.urls'

0 comments on commit e4e08ad

Please sign in to comment.