From 10ecb2158ee3b0b89b6af2ae55d9af171be84793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 13 Oct 2016 10:01:11 +0200 Subject: [PATCH] Log error when URLer service is used but not configured. --- pillar/web/nodes/routes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pillar/web/nodes/routes.py b/pillar/web/nodes/routes.py index 49eb8542..df2e6f0a 100644 --- a/pillar/web/nodes/routes.py +++ b/pillar/web/nodes/routes.py @@ -609,6 +609,10 @@ def project_url(project_id, project): if project is not None: return project + if not current_app.config['URLER_SERVICE_AUTH_TOKEN']: + log.error('No URLER_SERVICE_AUTH_TOKEN token, unable to use URLer service.') + return None + urler_api = system_util.pillar_api( token=current_app.config['URLER_SERVICE_AUTH_TOKEN']) return Project.find_from_endpoint(