diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2024-04-04 14:06:23 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2024-04-04 14:06:23 +0200 |
commit | 36ed4690af26688a3e86243b85970dafaab35a3b (patch) | |
tree | 024e585acc0b1856fad891f188b51ebeeb850db8 | |
parent | f43673af60286ddf97c70035ecd99e817ff846f7 (diff) |
add timeout for extract; use python3 in moveto3
-rwxr-xr-x | script/moveto3.py | 2 | ||||
-rw-r--r-- | src/jwebmail/__init__.py | 2 | ||||
-rw-r--r-- | src/jwebmail/model/read_mails.py | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/script/moveto3.py b/script/moveto3.py index ae10d63..fba5ddd 100755 --- a/script/moveto3.py +++ b/script/moveto3.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import os import sys 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() |