VirtualMailManager/quotalimit.py
branchv0.7.x
changeset 638 0de0b9e75c9f
parent 637 ca6621caff2f
child 643 df1e3b67882a
equal deleted inserted replaced
637:ca6621caff2f 638:0de0b9e75c9f
    50             assert isinstance(qid, (int, long))
    50             assert isinstance(qid, (int, long))
    51             self._load_by_qid(qid)
    51             self._load_by_qid(qid)
    52         else:
    52         else:
    53             bytes_, msgs = kwargs.get('bytes'), kwargs.get('messages')
    53             bytes_, msgs = kwargs.get('bytes'), kwargs.get('messages')
    54             assert all(isinstance(i, (int, long)) for i in (bytes_, msgs))
    54             assert all(isinstance(i, (int, long)) for i in (bytes_, msgs))
    55             if bytes_ < 0:
    55             self._bytes = -bytes_ if bytes_ < 0 else bytes_
    56                 self._bytes = -bytes_
    56             self._messages = -msgs if msgs < 0 else msgs
    57             else:
       
    58                 self._bytes = bytes_
       
    59             if msgs < 0:
       
    60                 self._messages = -msgs
       
    61             else:
       
    62                 self._messages = msgs
       
    63             self._load_by_limit()
    57             self._load_by_limit()
    64 
    58 
    65     @property
    59     @property
    66     def bytes(self):
    60     def bytes(self):
    67         """Quota limit in bytes."""
    61         """Quota limit in bytes."""