summaryrefslogtreecommitdiff
path: root/src/jwebmail/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/jwebmail/model')
-rw-r--r--src/jwebmail/model/read_mails.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/jwebmail/model/read_mails.py b/src/jwebmail/model/read_mails.py
index f82b601..291fa1e 100644
--- a/src/jwebmail/model/read_mails.py
+++ b/src/jwebmail/model/read_mails.py
@@ -31,13 +31,12 @@ class QMailAuthuser:
shell=True,
timeout=2,
)
- match completed_proc.returncode:
- case 0:
- return True
- case 1:
- return False
- case n:
- raise QMAuthError("authentication error", n)
+ if completed_proc.returncode == 0:
+ return True
+ if completed_proc.returncode == 1:
+ return False
+ else:
+ raise QMAuthError("authentication error", completed_proc.returncode)
except TimeoutExpired:
return False