VirtualMailManager/quotalimit.py
branchv0.6.x
changeset 400 0512d940918f
parent 385 0cae9989395b
child 407 3162ff959375
equal deleted inserted replaced
399:fb22773f7a85 400:0512d940918f
    53         if qid is not None:
    53         if qid is not None:
    54             assert isinstance(qid, (int, long))
    54             assert isinstance(qid, (int, long))
    55             self._load_by_qid(qid)
    55             self._load_by_qid(qid)
    56         else:
    56         else:
    57             bytes_, msgs = kwargs.get('bytes'), kwargs.get('messages')
    57             bytes_, msgs = kwargs.get('bytes'), kwargs.get('messages')
       
    58             if bytes_ == '0':  # default from Config
       
    59                 bytes_ = 0
    58             assert all(isinstance(i, (int, long)) for i in (bytes_, msgs))
    60             assert all(isinstance(i, (int, long)) for i in (bytes_, msgs))
    59             if bytes_ < 0:
    61             if bytes_ < 0:
    60                 self._bytes = -bytes_
    62                 self._bytes = -bytes_
    61             else:
    63             else:
    62                 self._bytes = bytes_
    64                 self._bytes = bytes_