Skip to content

Fixes close method call when imp returns None in loaders #502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 14, 2016

Conversation

vedarthk
Copy link
Contributor

@vedarthk vedarthk commented Dec 8, 2016

When django-celery tries to find related module from installed apps, the loading fails when tasks is a module inside one of the installed apps.

imp.find_module returns first argument as None if app_path is
a module and not a file

these changes will call close method only if the file is retuned

more information:
https://docs.python.org/2/library/imp.html#imp.find_module

`imp.find_module` returns first argument as `None` if app_path is
a module and not a file

these changes will call close method only if the file is retuned

more information:
https://docs.python.org/2/library/imp.html#imp.find_module
@vedarthk
Copy link
Contributor Author

@auvipy please can you have a look at this

@auvipy auvipy merged commit 71a2996 into celery:master Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants