[app] improvement: adding the environment variable if not available

This commit is contained in:
Vinicius Moreira
2021-11-29 12:40:05 -03:00
parent 09c455f441
commit 046d409366
2 changed files with 5 additions and 1 deletions

View File

@@ -15,6 +15,9 @@ def main(tray: bool = False):
if not os.getenv('PYTHONUNBUFFERED'):
os.environ['PYTHONUNBUFFERED'] = '1'
if not os.getenv('XDG_RUNTIME_DIR'):
os.environ['XDG_RUNTIME_DIR'] = f'/run/user/{os.getuid()}'
faulthandler.enable()
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)