[core] Do not error on home page when oozie is disabled
@@ -28,8 +28,6 @@ from desktop.lib.exceptions import StructuredException
from desktop.lib.i18n import force_unicode
from desktop.models import Document
-from jobbrowser.views import job_single_logs
-from jobbrowser.models import LinkJobLogs
from oozie.forms import WorkflowForm, NodeForm, design_form_by_type
from oozie.models import Workflow, Node, Start, End, Kill,\
Link, Decision, Fork, DecisionEnd, Join,\
@@ -41,6 +39,13 @@ from oozie.utils import model_to_dict, format_dict_field_values, format_field_va
LOG = logging.getLogger(__name__)
+try:
+ from jobbrowser.views import job_single_logs
+ from jobbrowser.models import LinkJobLogs
+except:
+ LOG.warn('Oozie is not enabled')
+
+
def error_handler(view_fn):
def decorator(request, *args, **kwargs):
try:
