diff options
author | Bruno Wagner <bwagner@riseup.net> | 2017-01-03 11:39:01 -0200 |
---|---|---|
committer | Bruno Wagner <bwagner@riseup.net> | 2017-01-03 11:39:01 -0200 |
commit | 3ef49142a553ed53aa3fe3c60539b93542434044 (patch) | |
tree | 8c98070e63533dd6d64783a84762849a98c3b36d /service/pixelated/resources | |
parent | a342defed365690f2189eb209be8224a505b58e5 (diff) |
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)
Diffstat (limited to 'service/pixelated/resources')
-rw-r--r-- | service/pixelated/resources/root_resource.py | 6 |
1 files changed, 1 insertions, 5 deletions
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 |