diff options
-rw-r--r-- | gajim/__init__.py | 10 | ||||
-rwxr-xr-x | launch.py | 12 |
2 files changed, 12 insertions, 10 deletions
diff --git a/gajim/__init__.py b/gajim/__init__.py index 873ad93a6..7bdaa1c37 100644 --- a/gajim/__init__.py +++ b/gajim/__init__.py @@ -1,4 +1,3 @@ -import subprocess import sys from pathlib import Path @@ -8,12 +7,3 @@ IS_FLATPAK = Path('/app/share/run-as-flatpak').exists() portable_path = Path(sys.executable).parent / 'is_portable' IS_PORTABLE = portable_path.exists() - -try: - p = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True, - stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) - node = p.communicate()[0] - if node: - __version__ += '+' + node.decode('utf-8').strip() -except Exception: - pass @@ -1,4 +1,16 @@ #!/usr/bin/env python3 +import subprocess from gajim import gajim + +try: + p = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True, + stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) + node = p.communicate()[0] + if node: + import gajim as g + g.__version__ += '+' + node.decode('utf-8').strip() +except Exception: + pass + gajim.main() |