VMM: Solve the default "misc.quota_bytes = '0'" problem where it may occur.
--- a/VirtualMailManager/handler.py Fri Feb 18 01:15:03 2011 +0000
+++ b/VirtualMailManager/handler.py Fri Feb 18 12:12:54 2011 +0000
@@ -431,7 +431,7 @@
else:
dom.set_transport(Transport(self._dbh, transport=transport))
dom.set_quotalimit(QuotaLimit(self._dbh,
- bytes=self._cfg.dget('misc.quota_bytes'),
+ bytes=long(self._cfg.dget('misc.quota_bytes')),
messages=self._cfg.dget('misc.quota_messages')))
dom.set_directory(self._cfg.dget('misc.base_directory'))
dom.save()
--- a/VirtualMailManager/quotalimit.py Fri Feb 18 01:15:03 2011 +0000
+++ b/VirtualMailManager/quotalimit.py Fri Feb 18 12:12:54 2011 +0000
@@ -55,8 +55,6 @@
self._load_by_qid(qid)
else:
bytes_, msgs = kwargs.get('bytes'), kwargs.get('messages')
- if bytes_ == '0': # default from Config
- bytes_ = 0
assert all(isinstance(i, (int, long)) for i in (bytes_, msgs))
if bytes_ < 0:
self._bytes = -bytes_