Skip to content

Commit

Permalink
Swallow errors on import time version detection if package is not liv…
Browse files Browse the repository at this point in the history
…ing in a git repository.

Closes #12.
  • Loading branch information
KelSolaar committed Apr 27, 2019
1 parent f7249f2 commit 316402f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion colour_demosaicing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@

try:
version = subprocess.check_output( # nosec
['git', 'describe'], cwd=os.path.dirname(__file__)).strip()
['git', 'describe'],
cwd=os.path.dirname(__file__),
stderr=subprocess.STDOUT).strip()
version = version.decode('utf-8')
except Exception:
version = __version__
Expand Down

0 comments on commit 316402f

Please sign in to comment.