summaryrefslogtreecommitdiff
path: root/ick2/versionapi.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-02-07 18:54:13 +0200
committerLars Wirzenius <liw@liw.fi>2018-02-09 19:11:02 +0200
commit5cf3781ad4beddfab5aa7181c0990a5462ffe06f (patch)
treea50a769bc8b6cc7e31f28466002c7dc15f2433b4 /ick2/versionapi.py
parent4b6fd81e121935f60f29b8314bc7c44726bf6fd7 (diff)
downloadick2-5cf3781ad4beddfab5aa7181c0990a5462ffe06f.tar.gz
Change: make all .service units be conditional on config
If the config file is missing, the unit won't start.
Diffstat (limited to 'ick2/versionapi.py')
-rw-r--r--ick2/versionapi.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/ick2/versionapi.py b/ick2/versionapi.py
index fddfdcc..40d1dda 100644
--- a/ick2/versionapi.py
+++ b/ick2/versionapi.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017 Lars Wirzenius
+# Copyright (C) 2017-2018 Lars Wirzenius
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@@ -18,6 +18,13 @@ import ick2
class VersionAPI(ick2.APIbase):
+ def __init__(self, state):
+ super().__init__(state)
+ self._blob_service_url = None
+
+ def set_blob_service_url(self, url):
+ self._blob_service_url = url
+
def get_routes(self, path): # pragma: no cover
return [
{
@@ -28,7 +35,10 @@ class VersionAPI(ick2.APIbase):
]
def get_version(self, **kwargs):
- return {'version': ick2.__version__}
+ return {
+ 'version': ick2.__version__,
+ 'blob_service': self._blob_service_url,
+ }
def create(self, body, **kwargs): # pragma: no cover
pass