summaryrefslogtreecommitdiff
path: root/server/src/leap
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-02-27 16:10:36 -0300
committerdrebs <drebs@leap.se>2017-02-27 16:10:36 -0300
commit5139e95a65cf6094711ebf12aca01fb6e9b47c8c (patch)
tree8981c57dcbf40cf27c336893d9ff67ea75e56de8 /server/src/leap
parent7eb1ffa1d49a7e0016c5980da71151e715abc77a (diff)
[style] move path config closer to blobs resource instantiation
Diffstat (limited to 'server/src/leap')
-rw-r--r--server/src/leap/soledad/server/_blobs.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/src/leap/soledad/server/_blobs.py b/server/src/leap/soledad/server/_blobs.py
index ae09f409..cacabbdf 100644
--- a/server/src/leap/soledad/server/_blobs.py
+++ b/server/src/leap/soledad/server/_blobs.py
@@ -22,18 +22,14 @@ from twisted.web import resource
from ._config import get_config
-__all__ = ['blobs_resource']
-
-
-_config = get_config()
-DEFAULT_BLOBS_PATH = _config['blobs_path']
+__all__ = ['BlobsResource', 'blobs_resource']
class BlobsResource(resource.Resource):
isLeaf = True
- def __init__(self, blobs_path=DEFAULT_BLOBS_PATH):
+ def __init__(self, blobs_path):
resource.Resource.__init__(self)
self._blobs_path = blobs_path
@@ -41,4 +37,8 @@ class BlobsResource(resource.Resource):
return 'blobs is not implemented yet!'
-blobs_resource = BlobsResource()
+# provide a configured instance of the resource
+_config = get_config()
+_path = _config['blobs_path']
+
+blobs_resource = BlobsResource(_path)