bugfix path licences
This commit is contained in:
parent
98d88fea79
commit
e10985ed44
|
@ -51,6 +51,7 @@ class DevicehubConfig(Config):
|
|||
|
||||
TMP_SNAPSHOTS = config('TMP_SNAPSHOTS', '/tmp/snapshots')
|
||||
TMP_LIVES = config('TMP_LIVES', '/tmp/lives')
|
||||
LICENCES = config('LICENCES', './licences.txt')
|
||||
"""This var is for save a snapshots in json format when fail something"""
|
||||
API_DOC_CONFIG_TITLE = 'Devicehub'
|
||||
API_DOC_CONFIG_VERSION = '0.2'
|
||||
|
|
|
@ -7,7 +7,9 @@ class LicenceView(View):
|
|||
def get(self, *args, **kwargs):
|
||||
"""Get version of DeviceHub and ereuse-tag."""
|
||||
|
||||
with open('licences.txt') as f:
|
||||
app = self.resource_def.app
|
||||
path_licences = app.config['LICENCES']
|
||||
with open(path_licences) as f:
|
||||
licences = f.read()
|
||||
|
||||
ret = jsonify(licences)
|
||||
|
|
Reference in a new issue