Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2023-05-27 18:28:13 +0300
committerPhilipp Hörist <philipp@hoerist.com>2023-05-27 18:28:13 +0300
commit3baa6b3376ace3979c345d8ceba490f3303e6aa4 (patch)
tree4f2bb3c9b0fde47de68772397db66ef60027a677 /launch.py
parent17b9e7acc63fc5bb8d43131a9ebc4b57171f873f (diff)
refactor: Simplify launch.py
Diffstat (limited to 'launch.py')
-rwxr-xr-xlaunch.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/launch.py b/launch.py
index 27558784a..e5757eace 100755
--- a/launch.py
+++ b/launch.py
@@ -2,16 +2,14 @@
import subprocess
-from gajim import gajim
+import gajim
+from gajim.gajim import main
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()
+ res = subprocess.check_output(
+ ['git', 'rev-parse', '--short=12', 'HEAD']) # noqa: S603, S607
+ gajim.__version__ += f'+{res.decode().strip()}'
except Exception:
pass
-gajim.main()
+main()