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".
This commit is contained in:
parent
b0cfdeab77
commit
cc77338ff4
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue