Permalink
Browse files

Fixing problem with getting git revision

  • Loading branch information...
ajj committed Aug 31, 2016
1 parent 4036cb0 commit a3f1c11e89e334f2707e2834709485c8107d1e72
Showing with 5 additions and 5 deletions.
  1. +5 −5 sasview/__init__.py
View
@@ -1,14 +1,14 @@
__version__ = "4.0b1"
__build__ = "GIT_COMMIT"
try:
import logging
import subprocess
import os
FNULL = open(os.devnull, 'w')
git_revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'],
git_revision = subprocess.check_output(['git describe --tags'],
#git_revision = subprocess.check_output(['pwd'],
stderr=FNULL,
shell=True)
__build__ = str(git_revision).strip()
except:
import logging
import sys
logging.warning("Error while determining build number\n %s" % sys.exc_value)
except subprocess.CalledProcessError as cpe:
logging.warning("Error while determining build number\n Using command:\n %s \n Output:\n %s"% (cpe.cmd,cpe.output))

0 comments on commit a3f1c11

Please sign in to comment.