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
This commit is contained in:
Cedric Brandily 2015-02-10 15:25:09 +01:00
parent 3b40ee0505
commit a2b5147e9d
1 changed files with 4 additions and 3 deletions

View File

@ -14,6 +14,7 @@
import pbr.version
__version__ = pbr.version.VersionInfo(
'flameclient').version_string()
try:
__version__ = pbr.version.VersionInfo('flameclient').version_string()
except Exception:
__version__ = 'unknown'