Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Throw ImportError on import_string failure #969

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcramer
Copy link
Member

@dcramer dcramer commented Feb 26, 2017

No description provided.

try:
return getattr(module, class_name)
except AttributeError as ex:
raise ImportError(unicode(ex))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will NameError on python 3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants