equal
deleted
inserted
replaced
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.""" |