Package: python3-django-extensions
Version: 3.2.1-2
Severity: normal

Dear Maintainer,

when both django_extensions and django_rq are enabled
job enumerating of django_extensions stops working.

The command 'django-admin runjobs -l' fails with exception

  File "/usr/lib/python3/dist-packages/django_extensions/management/jobs.py", 
line 120, in get_jobs
    path = find_job_module(app_name, subdir)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django_extensions/management/jobs.py", 
line 83, in find_job_module
    return module.__path__[0]
           ^^^^^^^^^^^^^^^
  AttributeError: module 'django_rq.jobs' has no attribute '__path__'. Did you 
mean: '__name__'?

I think, the problem is caused by django_rq/jobs.py being a single file
module without descedants.

The easiest fix I found is to place the following two lines refore
return from find_job_module function:

    if not hasattr(module, "__path__"):
        raise ImportError

Reply via email to