Philipp Hörist pushed to branch master at gajim / gajim
Commits: dbbf0782 by Philipp Hörist at 2018-05-27T13:45:07+02:00 Determine earlier if we run as Flatpak - - - - - 2 changed files: - gajim/__init__.py - gajim/common/app.py Changes: ===================================== gajim/__init__.py ===================================== --- a/gajim/__init__.py +++ b/gajim/__init__.py @@ -1,10 +1,15 @@ +import os import subprocess __version__ = "1.0.3" +IS_FLATPAK = False +if os.path.exists('/app/share/run-as-flatpak'): + IS_FLATPAK = True + try: p = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True, - stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) + stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) node = p.communicate()[0] if node: __version__ += '+' + node.decode('utf-8').strip() ===================================== gajim/common/app.py ===================================== --- a/gajim/common/app.py +++ b/gajim/common/app.py @@ -156,7 +156,6 @@ _dependencies = { 'PYCURL': False, 'GSPELL': False, 'IDLE': False, - 'RUN_AS_FLATPAK': False, } @@ -170,7 +169,7 @@ def is_installed(dependency): return _dependencies[dependency] def is_flatpak(): - return _dependencies['RUN_AS_FLATPAK'] + return gajim.IS_FLATPAK def disable_dependency(dependency): _dependencies[dependency] = False @@ -296,10 +295,6 @@ def detect_dependencies(): except (ImportError, ValueError): pass - # RUN AS FLATPAK - if os.path.exists('/app/share/run-as-flatpak'): - _dependencies['RUN_AS_FLATPAK'] = True - # Print results for dep, val in _dependencies.items(): log('gajim').info('%-13s %s', dep, val) View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/dbbf078229e78f34fa950a17acd46cb5852c7149 --- View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/dbbf078229e78f34fa950a17acd46cb5852c7149 You're receiving this email because of your account on dev.gajim.org.
_______________________________________________ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits