from optparse import Option
import django
from django.conf import settings
+from django.core.exceptions import ImproperlyConfigured
from django.core.management import ManagementUtility, get_commands, BaseCommand
__author__ = 'Ilya.Kazakevich'
"""
utility = ManagementUtility()
for command_name in get_commands().keys():
- command = utility.fetch_command(command_name)
+ try:
+ command = utility.fetch_command(command_name)
+ except ImproperlyConfigured:
+ continue # TODO: Log somehow
+
assert isinstance(command, BaseCommand)
dumper.start_command(command_name=command_name,
command_help_text=str(command.usage("").replace("%prog", command_name)),