From cc77338ff47ed2035d7447db4299b862fd184207 Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Thu, 21 Jan 2016 10:36:30 +0100 Subject: [PATCH] check_mail.py: more detailed report on IOError When user doesn't have permissions to access some file, he is better served by exact error message python recieved then by statement "not a mailbox". --- contrib/check_mail.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/check_mail.py b/contrib/check_mail.py index 14d2e82..ac23f77 100755 --- a/contrib/check_mail.py +++ b/contrib/check_mail.py @@ -82,6 +82,9 @@ def check_mail(label, nomail, ignore, colors): else: return nomail, colors[0] + except IOError, exception: + return '{0}: {1}'.format(name, exception.strerror), colors[2] + except: pass -- 2.39.5