Commit dbbf0782 authored by Philipp Hörist's avatar Philipp Hörist

Determine earlier if we run as Flatpak

parent b749eccf
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()
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment