X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_common%2F__init__.py;h=8bc5507d7b2158a39621ac4e07878a1f65bce572;hb=HEAD;hp=df7b893827a1c7886d1e9899affb729ac5aedcff;hpb=5c012612f1292b012dc12b337c611c6f3c083b18;p=osm%2Fcommon.git diff --git a/osm_common/__init__.py b/osm_common/__init__.py index df7b893..c4c32da 100644 --- a/osm_common/__init__.py +++ b/osm_common/__init__.py @@ -1,2 +1,29 @@ -version = '0.1.3' -date_version = '2018-04-19' \ No newline at end of file +# -*- coding: utf-8 -*- + +# Copyright 2018 Telefonica S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import logging + +version = "7.0.0.post4" +date_version = "2019-01-21" + +# try to get version from installed package. Skip if fails +try: + from pkg_resources import get_distribution + + version = get_distribution("osm_common").version + +except Exception as init_error: + logging.exception(f"{init_error} occured while getting the common version")