From 3e052f72c160adc5422bb09bc25c5dd38ee59170 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sun, 17 Nov 2024 13:43:19 +0100 Subject: use which from shutil for proper path lookup --- src/jwebmail/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/jwebmail') 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") ) -- cgit v1.2.3