From b3f9063ae798901c5821031b14e44cda17627f23 Mon Sep 17 00:00:00 2001 From: John Supplee Date: Tue, 29 Jan 2019 19:41:54 +0200 Subject: [PATCH] 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 --- management/mailconfig.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/management/mailconfig.py b/management/mailconfig.py index cdd05079..3a471a80 100755 --- a/management/mailconfig.py +++ b/management/mailconfig.py @@ -136,15 +136,15 @@ def get_mail_users_ex(env, with_archived=False): box_size = 0 box_count = 0 box_quota = '' - try: - with open('/home/user-data/mail/mailboxes/%s/%s/maildirsize' % (domain, user), 'r') as f: - box_quota = f.readline() - for line in f.readlines(): - (size, count) = line.split(' ') - box_size += int(size) - box_count += int(count) - except: - box_size = '?' + # try: + # with open('/home/user-data/mail/mailboxes/%s/%s/maildirsize' % (domain, user), 'r') as f: + # box_quota = f.readline() + # for line in f.readlines(): + # (size, count) = line.split(' ') + # box_size += int(size) + # box_count += int(count) + # except: + # box_size = '?' user = { "email": email,