Catch exception only when resolving django.setup