From 3ee0b7e2881446db79099e207346fd67110c98fe Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 30 Jul 2024 12:19:23 +0200 Subject: [PATCH] fix #385 --- CHANGELOG.md | 2 ++ chatmaild/src/chatmaild/tests/test_user.py | 4 ++-- chatmaild/src/chatmaild/user.py | 1 - cmdeploy/src/cmdeploy/cmdeploy.py | 3 +-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 209fb7b9..591b0d53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for chatmail deployment +## untagged + ## 1.4.0 2024-07-28 - Add `disable_ipv6` config option to chatmail.ini. diff --git a/chatmaild/src/chatmaild/tests/test_user.py b/chatmaild/src/chatmaild/tests/test_user.py index e927a883..e6f944f0 100644 --- a/chatmaild/src/chatmaild/tests/test_user.py +++ b/chatmaild/src/chatmaild/tests/test_user.py @@ -12,11 +12,11 @@ def test_get_user_dict_not_set(testaddr, example_config, caplog): user = example_config.get_user(testaddr) assert not caplog.records assert user.get_userdb_dict() == {} - assert len(caplog.records) == 1 + assert len(caplog.records) == 0 user.set_password("") assert user.get_userdb_dict() == {} - assert len(caplog.records) == 2 + assert len(caplog.records) == 1 def test_get_user_dict(make_config, tmp_path): diff --git a/chatmaild/src/chatmaild/user.py b/chatmaild/src/chatmaild/user.py index 6283ab03..e9030e40 100644 --- a/chatmaild/src/chatmaild/user.py +++ b/chatmaild/src/chatmaild/user.py @@ -26,7 +26,6 @@ def get_userdb_dict(self): try: pw = self.password_path.read_text() except FileNotFoundError: - logging.error(f"password not set for: {self.addr}") return {} if not pw: diff --git a/cmdeploy/src/cmdeploy/cmdeploy.py b/cmdeploy/src/cmdeploy/cmdeploy.py index 1c355409..67d038eb 100644 --- a/cmdeploy/src/cmdeploy/cmdeploy.py +++ b/cmdeploy/src/cmdeploy/cmdeploy.py @@ -12,11 +12,10 @@ import subprocess import sys from pathlib import Path -from packaging import version import pyinfra - from chatmaild.config import read_config, write_initial_config +from packaging import version from termcolor import colored from . import dns, remote_funcs