Commit 7fffe4e9 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

better printing of configure error messages

parent 083ee8e7
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
import os
import sys
import logging
from django.core import management
from django.core import management, exceptions


class ManagementUtility(management.ManagementUtility):

	def fetch_command(self, subcommand):
		from django.core.management.commands.runserver import Command
		try:
			from django.conf import settings
			from django.core.management.commands.runserver import Command
		except (exceptions.ImproperlyConfigured) as exc:
			sys.stderr.write(
				"cannot run '{0}' due to improperly configured settings: {1}\n"
				.format(subcommand, exc)
			);
			sys.exit(1)

		class RunserverCommand(Command):
			def run(self, **options):