diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2024-11-17 13:43:19 +0100 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2024-11-17 13:43:19 +0100 |
commit | 3e052f72c160adc5422bb09bc25c5dd38ee59170 (patch) | |
tree | 11e239dab6f859fb6e2dbb4cb284b8d8019293f5 /src/jwebmail | |
parent | c7e91245005b3209fd32ab1064d8bcf3ddaed801 (diff) |
use which from shutil for proper path lookup
Diffstat (limited to 'src/jwebmail')
-rw-r--r-- | src/jwebmail/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index ff6d17c..fe32430 100644 --- a/src/jwebmail/__init__.py +++ b/src/jwebmail/__init__.py @@ -1,7 +1,7 @@ -import os.path as os_path import sys from datetime import datetime from os import environ +from shutil import which from babel import parse_locale from flask import Flask, abort, g, redirect, url_for @@ -36,7 +36,7 @@ else: toml_read_file = dict(load=toml_load, text=True) -__version__ = "2.6.0.dev1" +__version__ = "2.6.0.dev2" csrf = CSRFProtect() @@ -46,9 +46,9 @@ def validate_config(app): assert "@" in conf["JWEBMAIL"]["ADMIN_MAIL"] - assert os_path.isfile(conf["JWEBMAIL"]["READ_MAILS"]["BACKEND"]) + assert which(conf["JWEBMAIL"]["READ_MAILS"]["BACKEND"]) - assert os_path.isfile( + assert which( conf["JWEBMAIL"]["READ_MAILS"].setdefault("AUTHENTICATOR", "qmail-authuser") ) |