Move the "from openquake import job" line to the bottom

Bug #842604 reported by Muharem Hrnjadovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
Medium
Muharem Hrnjadovic

Bug Description

.. of /usr/bin/openquake in order to avoid ugly stack traces when the user just wants to see the version or the help:

ubuntu@ubuntu:/usr/openquake$ openquake --version
Traceback (most recent call last):
  File "/usr/bin/openquake", line 64, in <module>
    from openquake import job
  File "/usr/lib/pymodules/python2.7/openquake/job/__init__.py", line 29, in <module>
    from django.db import transaction
  File "/usr/lib/pymodules/python2.7/django/db/__init__.py", line 14, in <module>
    if not settings.DATABASES:
  File "/usr/lib/pymodules/python2.7/django/utils/functional.py", line 276, in __getattr__
    self._setup()
  File "/usr/lib/pymodules/python2.7/django/conf/__init__.py", line 38, in _setup
    raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.

Changed in openquake:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Muharem Hrnjadovic (al-maisan)
milestone: none → 0.4.3
tags: added: packaging
tags: added: sys-quality
Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.