Skip to content

Commit

Permalink
Fix imports using appconfig. Fixes #86.
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Feb 5, 2015
1 parent 1d36e62 commit 95f307f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion huey/djhuey/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys

from django.conf import settings
from django.db import close_connection
#from django.db import close_connection

from huey import crontab
from huey import Huey
Expand Down
4 changes: 3 additions & 1 deletion huey/djhuey/management/commands/run_huey.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ def autodiscover_appconfigs(self):
for config in django_apps.get_app_configs():
app_path = config.module.__path__
try:
imp.find_module(module_name, app_path)
fp, path, description = imp.find_module(module_name, app_path)
except ImportError:
continue
else:
imp.load_module(module_name, fp, path, description)

def autodiscover_old(self):
# this is to find modules named <commands.py> in a django project's
Expand Down

0 comments on commit 95f307f

Please sign in to comment.