ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since c155a16 was
c155a16,
checked in by Ricardo Ferraz Leal <ricleal@…>, 7 years ago
|
Logging is now logger
|
-
Property mode set to
100644
|
File size:
641 bytes
|
Line | |
---|
1 | __version__ = "4.1" |
---|
2 | __build__ = "GIT_COMMIT" |
---|
3 | |
---|
4 | import logging |
---|
5 | logger = logging.getLogger() |
---|
6 | |
---|
7 | try: |
---|
8 | import subprocess |
---|
9 | import os |
---|
10 | import platform |
---|
11 | FNULL = open(os.devnull, 'w') |
---|
12 | if platform.system() == "Windows": |
---|
13 | args = ['git', 'describe', '--tags'] |
---|
14 | else: |
---|
15 | args = ['git describe --tags'] |
---|
16 | git_revision = subprocess.check_output(args, |
---|
17 | stderr=FNULL, |
---|
18 | shell=True) |
---|
19 | __build__ = str(git_revision).strip() |
---|
20 | except subprocess.CalledProcessError as cpe: |
---|
21 | logger.warning("Error while determining build number\n Using command:\n %s \n Output:\n %s"% (cpe.cmd,cpe.output)) |
---|
Note: See
TracBrowser
for help on using the repository browser.