VirtualMailManager/quotalimit.py
branchv0.6.x
changeset 407 3162ff959375
parent 400 0512d940918f
child 450 fd4aa073015f
equal deleted inserted replaced
406:58e23bd7c97f 407:3162ff959375
    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
       
    60             assert all(isinstance(i, (int, long)) for i in (bytes_, msgs))
    58             assert all(isinstance(i, (int, long)) for i in (bytes_, msgs))
    61             if bytes_ < 0:
    59             if bytes_ < 0:
    62                 self._bytes = -bytes_
    60                 self._bytes = -bytes_
    63             else:
    61             else:
    64                 self._bytes = bytes_
    62                 self._bytes = bytes_