From 36ed4690af26688a3e86243b85970dafaab35a3b Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Thu, 4 Apr 2024 14:06:23 +0200 Subject: add timeout for extract; use python3 in moveto3 --- src/jwebmail/__init__.py | 2 +- src/jwebmail/model/read_mails.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/jwebmail') diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index 278ef50..58bc8d5 100644 --- a/src/jwebmail/__init__.py +++ b/src/jwebmail/__init__.py @@ -34,7 +34,7 @@ else: toml_read_file = dict(load=toml_load, text=True) -__version__ = "2.2.1.dev0" +__version__ = "2.2.1.dev1" def validate_config(app): diff --git a/src/jwebmail/model/read_mails.py b/src/jwebmail/model/read_mails.py index d3887ca..e35299f 100644 --- a/src/jwebmail/model/read_mails.py +++ b/src/jwebmail/model/read_mails.py @@ -231,7 +231,9 @@ class QMailAuthuser: popen.stdin.close() inp = popen.stdout.readall() - if popen.poll() is None: + try: + popen.wait(timeout=2) + except TimeoutExpired: popen.kill() popen.poll() -- cgit v1.2.3