From 1eb1cd7b64cb2ec112877f161fe1d77eb6a0cb4a Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Sun, 12 Mar 2017 18:46:08 +0100 Subject: [PATCH] Fix for crash on extension blueprints loading It the extension was registered with url_prefix=None, we set url_prefix to empty string so it can be added to blueprint.url_prefix. --- pillar/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pillar/__init__.py b/pillar/__init__.py index a1b2c2e6..3f463b01 100644 --- a/pillar/__init__.py +++ b/pillar/__init__.py @@ -206,6 +206,9 @@ class PillarServer(Eve): # Load extension blueprint(s) for blueprint in pillar_extension.blueprints(): if blueprint.url_prefix: + if not url_prefix: + # If we registered the extension with url_prefix=None + url_prefix = '' blueprint_prefix = url_prefix + blueprint.url_prefix else: blueprint_prefix = url_prefix