Changeset a3f1c11e in sasview


Ignore:
Timestamp:
Aug 31, 2016 9:46:14 AM (8 years ago)
Author:
ajj
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
654e8e0
Parents:
4036cb0
Message:

Fixing problem with getting git revision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasview/__init__.py

    r86eb046 ra3f1c11e  
    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.