From 048762e764f6e7982b3e59770366d6d624c734d8 Mon Sep 17 00:00:00 2001 From: missytake Date: Thu, 11 Apr 2024 15:25:28 +0200 Subject: [PATCH] lint: fix --- doc/index.rst | 2 +- src/mailadm/app.py | 1 + src/mailadm/conn.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index 1a72a503..90b9678e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -315,7 +315,7 @@ To setup your development environment, you need to do something like this: git clone https://github.com/deltachat/mailadm python3 -m venv venv . venv/bin/activate - pip install pytest tox pytest-xdist pytest-timeout pyzbar + pip install pytest tox pytest-xdist pytest-timeout pyzbar black ruff sudo apt install -y libzbar0 pip install . diff --git a/src/mailadm/app.py b/src/mailadm/app.py index cb499358..d48b49fb 100644 --- a/src/mailadm/app.py +++ b/src/mailadm/app.py @@ -1,6 +1,7 @@ """ help gunicorn and other WSGI servers to instantiate a web instance of mailadm """ + import threading from mailadm.bot import get_admbot_db_path diff --git a/src/mailadm/conn.py b/src/mailadm/conn.py index 7ddf614e..46e5f982 100644 --- a/src/mailadm/conn.py +++ b/src/mailadm/conn.py @@ -275,7 +275,7 @@ def get_expired_users(self, sysdate): expired_users.append(user) continue mc_user = self.get_mailcow_connection().get_user(user.addr) - if not mc_user: + if mc_user is None: logging.warning("user %s doesn't exist in mailcow", user.addr) continue last_login = mc_user.last_login