Changeset 69d8aac in sasview


Ignore:
Timestamp:
Sep 15, 2016 8:33:57 AM (8 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
ca3f89b
Parents:
d470dc7
git-author:
Andrew Jackson <andrew.jackson@…> (08/31/16 11:46:14)
git-committer:
Piotr Rozyczko <rozyczko@…> (09/15/16 08:33:57)
Message:

Fixing problem with getting git revision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasview/__init__.py

    r153ee77 r69d8aac  
    22__build__ = "GIT_COMMIT" 
    33try: 
     4    import logging 
    45    import subprocess 
    56    import os 
    67    FNULL = open(os.devnull, 'w') 
    7     git_revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'], 
     8    git_revision = subprocess.check_output(['git describe --tags'], 
     9    #git_revision = subprocess.check_output(['pwd'], 
    810                    stderr=FNULL, 
    911                    shell=True) 
    1012    __build__ = str(git_revision).strip() 
    11 except: 
    12     import logging 
    13     import sys 
    14     logging.warning("Error while determining build number\n  %s" % sys.exc_value) 
     13except subprocess.CalledProcessError as cpe: 
     14    logging.warning("Error while determining build number\n  Using command:\n %s \n Output:\n %s"% (cpe.cmd,cpe.output)) 
Note: See TracChangeset for help on using the changeset viewer.