From b65dd49aa62f551d45a48500ff4249159fdbbe37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 3 Mar 2017 12:01:38 +0100 Subject: [PATCH] Renamed static.py to staticfile.py Python 3 supports 'namespace packages', and thus can see a directory without __init__.py as something importable. This caused a name conflict, since there were both the file static.py and the dir static. --- pillar/__init__.py | 2 +- pillar/web/{static.py => staticfile.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename pillar/web/{static.py => staticfile.py} (100%) diff --git a/pillar/__init__.py b/pillar/__init__.py index 2e136a34..a1b2c2e6 100644 --- a/pillar/__init__.py +++ b/pillar/__init__.py @@ -280,7 +280,7 @@ class PillarServer(Eve): ext.static_path) def register_static_file_endpoint(self, url_prefix, endpoint_name, static_folder): - from pillar.web.static import PillarStaticFile + from pillar.web.staticfile import PillarStaticFile view_func = PillarStaticFile.as_view(endpoint_name, static_folder=static_folder) self.add_url_rule('%s/' % url_prefix, view_func=view_func) diff --git a/pillar/web/static.py b/pillar/web/staticfile.py similarity index 100% rename from pillar/web/static.py rename to pillar/web/staticfile.py