﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2947	ImportError raised in my management.py is swallowed	paul@…	nobody	"This code in ""management.py"" has the same bug as was reported in ticket 2669

http://code.djangoproject.com/ticket/2669

    # Import the 'management' module within each installed app, to register
    # dispatcher events.
    for app_name in settings.INSTALLED_APPS:
        try:
            __import__(app_name + '.management', '', '', [''])
        except ImportError:
            pass

If mysite/myapp/management.py tries to import a non-existent module, or imports a module that imports a non-existent module, then management.py is ignored silently. This is very hard to diagnost and debug! At first, I had no idea why management.py seemed to cease to exist. Then after a while, I guessed, based on my knowledge of how Python works.

The solution should be the same as for 2669. Perhaps it would be good to audit all situations where ImportError is raised.

"	defect	closed	Core (Other)		normal	duplicate			Design decision needed	0	0	0	0	0	0
