equal
deleted
inserted
replaced
811 """Wrapper for Account.update_quotalimit(QuotaLimit).""" |
811 """Wrapper for Account.update_quotalimit(QuotaLimit).""" |
812 acc = self._get_account(emailaddress) |
812 acc = self._get_account(emailaddress) |
813 if not acc: |
813 if not acc: |
814 raise VMMError(_(u"The account '%s' does not exist.") % |
814 raise VMMError(_(u"The account '%s' does not exist.") % |
815 acc.address, NO_SUCH_ACCOUNT) |
815 acc.address, NO_SUCH_ACCOUNT) |
816 if bytes_ == 'default': |
816 if bytes_ == 'domain': |
817 quotalimit = None |
817 quotalimit = None |
818 else: |
818 else: |
819 if not all(isinstance(i, (int, long)) for i in (bytes_, messages)): |
819 if not all(isinstance(i, (int, long)) for i in (bytes_, messages)): |
820 raise TypeError("'bytes_' and 'messages' have to be " |
820 raise TypeError("'bytes_' and 'messages' have to be " |
821 "integers or longs.") |
821 "integers or longs.") |
830 INVALID_ARGUMENT) |
830 INVALID_ARGUMENT) |
831 acc = self._get_account(emailaddress) |
831 acc = self._get_account(emailaddress) |
832 if not acc: |
832 if not acc: |
833 raise VMMError(_(u"The account '%s' does not exist.") % |
833 raise VMMError(_(u"The account '%s' does not exist.") % |
834 acc.address, NO_SUCH_ACCOUNT) |
834 acc.address, NO_SUCH_ACCOUNT) |
835 if transport == 'default': |
835 if transport == 'domain': |
836 transport = None |
836 transport = None |
837 else: |
837 else: |
838 transport = Transport(self._dbh, transport=transport) |
838 transport = Transport(self._dbh, transport=transport) |
839 acc.update_transport(transport) |
839 acc.update_transport(transport) |
840 |
840 |
842 """Wrapper around Account.update_serviceset().""" |
842 """Wrapper around Account.update_serviceset().""" |
843 acc = self._get_account(emailaddress) |
843 acc = self._get_account(emailaddress) |
844 if not acc: |
844 if not acc: |
845 raise VMMError(_(u"The account '%s' does not exist.") % |
845 raise VMMError(_(u"The account '%s' does not exist.") % |
846 acc.address, NO_SUCH_ACCOUNT) |
846 acc.address, NO_SUCH_ACCOUNT) |
847 if len(services) == 1 and services[0] == 'default': |
847 if len(services) == 1 and services[0] == 'domain': |
848 serviceset = None |
848 serviceset = None |
849 else: |
849 else: |
850 kwargs = dict.fromkeys(SERVICES, False) |
850 kwargs = dict.fromkeys(SERVICES, False) |
851 for service in set(services): |
851 for service in set(services): |
852 if service not in SERVICES: |
852 if service not in SERVICES: |