comment out code generating errors
When the `maildirsize` file does not exist it causes the script to fail. The IOError is not caught by the execpt
This commit is contained in:
parent
f68ef70b94
commit
b3f9063ae7
|
@ -136,15 +136,15 @@ def get_mail_users_ex(env, with_archived=False):
|
||||||
box_size = 0
|
box_size = 0
|
||||||
box_count = 0
|
box_count = 0
|
||||||
box_quota = ''
|
box_quota = ''
|
||||||
try:
|
# try:
|
||||||
with open('/home/user-data/mail/mailboxes/%s/%s/maildirsize' % (domain, user), 'r') as f:
|
# with open('/home/user-data/mail/mailboxes/%s/%s/maildirsize' % (domain, user), 'r') as f:
|
||||||
box_quota = f.readline()
|
# box_quota = f.readline()
|
||||||
for line in f.readlines():
|
# for line in f.readlines():
|
||||||
(size, count) = line.split(' ')
|
# (size, count) = line.split(' ')
|
||||||
box_size += int(size)
|
# box_size += int(size)
|
||||||
box_count += int(count)
|
# box_count += int(count)
|
||||||
except:
|
# except:
|
||||||
box_size = '?'
|
# box_size = '?'
|
||||||
|
|
||||||
user = {
|
user = {
|
||||||
"email": email,
|
"email": email,
|
||||||
|
|
Loading…
Reference in New Issue