flame/flameclient/__init__.py
Cedric Brandily a2b5147e9d Allow to use flame in dev mode
__version__ computation fails when flame is installed in dev mode[1]
and run outside of its git folder. This change sets __version__ to
"unknown" when its computation fails.

[1]: python setup.py develop or pîp install -e

Change-Id: Ie5ea2bcb548623a059c450d1a7d541ff1cd242b0
2015-02-11 09:48:40 +01:00

21 lines
716 B
Python

# -*- coding: utf-8 -*-
# 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 pbr.version
try:
__version__ = pbr.version.VersionInfo('flameclient').version_string()
except Exception:
__version__ = 'unknown'