From 3ef49142a553ed53aa3fe3c60539b93542434044 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Tue, 3 Jan 2017 11:39:01 -0200 Subject: Simplifies the get_static_folder on RootResource There are only two possibilities currently: - The static files are at web-ui/dist - The static files are installed by the debian package at /usr/share/pixelated-user-agent This change removed the third non-existent possibility that was causing errors sometimes in a new environment (service/web-ui/dist) --- service/pixelated/resources/root_resource.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'service/pixelated/resources') diff --git a/service/pixelated/resources/root_resource.py b/service/pixelated/resources/root_resource.py index 101ff6b8..b4eef4ec 100644 --- a/service/pixelated/resources/root_resource.py +++ b/service/pixelated/resources/root_resource.py @@ -111,11 +111,7 @@ class RootResource(BaseResource): return os.path.join(path, '..', 'assets') def _get_static_folder(self): - static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "web-ui", "dist")) - # this is a workaround for packaging - if not os.path.exists(static_folder): - static_folder = os.path.abspath( - os.path.join(os.path.abspath(__file__), "..", "..", "..", "..", "web-ui", "dist")) + static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "..", "web-ui", "dist")) if not os.path.exists(static_folder): static_folder = os.path.join('/', 'usr', 'share', 'pixelated-user-agent') return static_folder -- cgit v1.2.3