summaryrefslogtreecommitdiff
path: root/contrib/check_mail.py
diff options
context:
space:
mode:
authorDmitrij D. Czarkoff <czarkoff@gmail.com>2016-01-21 10:36:30 +0100
committerDmitrij D. Czarkoff <czarkoff@gmail.com>2016-01-21 10:36:30 +0100
commitcc77338ff47ed2035d7447db4299b862fd184207 (patch)
tree0b01e26b0f92d73ea0a79d2bb0a3fa8febca7358 /contrib/check_mail.py
parentb0cfdeab7739ab12250e5a6b5622c48ac9241e6a (diff)
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".
Diffstat (limited to 'contrib/check_mail.py')
-rwxr-xr-xcontrib/check_mail.py3
1 files changed, 3 insertions, 0 deletions
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