[fix] user quota

This commit is contained in:
Adrien Beudin 2015-04-12 09:15:36 +00:00
parent c31ddef8b6
commit 449dc5d89e

View file

@ -384,9 +384,12 @@ def user_info(auth, username):
userquota = subprocess.check_output(cmd,stderr=subprocess.STDOUT,
shell=True)
quotavalue = re.findall(r'\d+', userquota)
result = '%s / %s (%s%s)' % ( _convertSize(eval(quotavalue[0])),
user['mailuserquota'][0], quotavalue[2], '%')
result_dict['mailbox-quota'] = result
result = '%s (%s%s)' % ( _convertSize(eval(quotavalue[0])),
quotavalue[2], '%')
result_dict['mailbox-quota'] = {
'limit' : user['mailuserquota'][0],
'use' : result
}
else:
result_dict['mailbox-quota'] = m18n.n('unlimit')