diff options
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/__init__.py | 1 | ||||
-rw-r--r-- | python/vyos/base.py | 22 | ||||
-rw-r--r-- | python/vyos/version.py | 4 |
3 files changed, 23 insertions, 4 deletions
diff --git a/python/vyos/__init__.py b/python/vyos/__init__.py index e69de29bb..9b5ed21c9 100644 --- a/python/vyos/__init__.py +++ b/python/vyos/__init__.py @@ -0,0 +1 @@ +from .base import * diff --git a/python/vyos/base.py b/python/vyos/base.py new file mode 100644 index 000000000..6197ed074 --- /dev/null +++ b/python/vyos/base.py @@ -0,0 +1,22 @@ +# Copyright (c) 2018 VyOS maintainers and contributors +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the Software +# is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# 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. + + +class ConfigError(Exception): + pass diff --git a/python/vyos/version.py b/python/vyos/version.py index b3eff3965..5d32d878d 100644 --- a/python/vyos/version.py +++ b/python/vyos/version.py @@ -19,10 +19,6 @@ import json -class ConfigError(Exception): - pass - - def get_version_data(file='/opt/vyatta/etc/version.json'): with open(file, 'r') as f: version_data = json.load(f) |