Changes in sasview/__init__.py [801a296:9a182b2] in sasview


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasview/__init__.py

    r801a296 r9a182b2  
    1 __version__ = "4.0.0-alpha" 
     1__version__ = "4.0" 
    22__build__ = "GIT_COMMIT" 
    33try: 
     4    import logging 
    45    import subprocess 
    56    import os 
     7    import platform 
    68    FNULL = open(os.devnull, 'w') 
    7     git_revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'], 
     9    if platform.system() == "Windows": 
     10        args = ['git', 'describe', '--tags'] 
     11    else: 
     12        args = ['git describe --tags'] 
     13    git_revision = subprocess.check_output(args, 
    814                    stderr=FNULL, 
    915                    shell=True) 
    1016    __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) 
     17except subprocess.CalledProcessError as cpe: 
     18    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.