mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
run black
This commit is contained in:
@@ -168,7 +168,9 @@ class Settings:
|
||||
except ImportError as exc:
|
||||
# If the 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") from exc
|
||||
raise ImproperlyConfigured(
|
||||
f"Settings module {self.SETTINGS_MODULE} could not be imported"
|
||||
) from exc
|
||||
raise
|
||||
|
||||
tuple_settings = (
|
||||
|
||||
@@ -383,8 +383,8 @@ class ManagementUtility:
|
||||
except ImproperlyConfigured as exc:
|
||||
self.settings_exception = exc
|
||||
# The following commands can be run even without a valid settings file configured
|
||||
if subcommand not in {'startproject', 'startapp', 'makemessages'}:
|
||||
sys.stderr.write(str(exc) + '\n')
|
||||
if subcommand not in {"startproject", "startapp", "makemessages"}:
|
||||
sys.stderr.write(str(exc) + "\n")
|
||||
self.settings_exception = exc
|
||||
|
||||
if settings.configured:
|
||||
|
||||
Reference in New Issue
Block a user