mirror of
https://github.com/django/django.git
synced 2025-06-08 21:19:13 +00:00
fix flake8 errors
This commit is contained in:
parent
e9c7695a43
commit
f87b23d8a1
@ -166,7 +166,7 @@ class Settings:
|
||||
try:
|
||||
mod = importlib.import_module(self.SETTINGS_MODULE)
|
||||
except ImportError as exc:
|
||||
# If the settings module cannot be imported, treat it as a configuration error.
|
||||
# If settings module cannot be imported, treat it as a configuration error.
|
||||
if exc.name == self.SETTINGS_MODULE:
|
||||
raise ImproperlyConfigured(
|
||||
f"Settings module {self.SETTINGS_MODULE} could not be imported"
|
||||
|
@ -382,7 +382,7 @@ class ManagementUtility:
|
||||
settings.INSTALLED_APPS
|
||||
except ImproperlyConfigured as exc:
|
||||
self.settings_exception = exc
|
||||
# The following commands can be run even without a valid settings file configured
|
||||
# The following commands can be run without a valid settings file configured
|
||||
if subcommand not in {"startproject", "startapp", "makemessages"}:
|
||||
sys.stderr.write(str(exc) + "\n")
|
||||
self.settings_exception = exc
|
||||
|
Loading…
x
Reference in New Issue
Block a user