diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-06-08 20:50:12 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-06-08 20:50:12 +0200 |
commit | e916c9a55ffdff970c1796829d1bee319802b353 (patch) | |
tree | 85288e18fa3d93e6031472bb2ca66528f6778db1 /python/vyos/version.py | |
parent | 6acc5f6cb03f553141b0442f5e01cbf47b8e7833 (diff) | |
download | vyos-1x-e916c9a55ffdff970c1796829d1bee319802b353.tar.gz vyos-1x-e916c9a55ffdff970c1796829d1bee319802b353.zip |
Move the version.json file used by newer code to /usr/share/vyos
Diffstat (limited to 'python/vyos/version.py')
-rw-r--r-- | python/vyos/version.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/vyos/version.py b/python/vyos/version.py index 5d32d878d..545d4e76b 100644 --- a/python/vyos/version.py +++ b/python/vyos/version.py @@ -17,9 +17,14 @@ # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR # IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import os import json -def get_version_data(file='/opt/vyatta/etc/version.json'): +import vyos.defaults + +version_file = os.path.join(vyos.defaults.directories['data'], 'version.json') + +def get_version_data(file=version_file): with open(file, 'r') as f: version_data = json.load(f) return version_data |