Modify userinfo output to indicate when domain defaults are displayed
When Account instances reference NULL tid/qid/ssid, the data must come from
the associated domain, and this should be indicated. For transport and
services, this is easy to do as the string passed in the info dict can simply
be modified. For quotalimit, however, another method must be used due to the
CLI-side formatting.
All approaches use a common formatter outsourced to the common.py file.
# -*- coding: UTF-8 -*-# Copyright (c) 2007 - 2011, Pascal Volk# See COPYING for distribution information.""" VirtualMailManager.errors ~~~~~~~~~~~~~~~~~~~~~~~~~ VMM's Exception classes"""classVMMError(Exception):"""Exception base class for VirtualMailManager exceptions"""def__init__(self,msg,code):Exception.__init__(self,msg)self.msg=msgself.code=int(code)def__repr__(self):return'%s(%r, %r)'%(self.__class__.__name__,self.msg,self.code)classConfigError(VMMError):"""Exception class for configuration exceptions"""passclassPermissionError(VMMError):"""Exception class for permissions exceptions"""passclassNotRootError(VMMError):"""Exception class for non-root exceptions"""passclassDomainError(VMMError):"""Exception class for Domain exceptions"""passclassAliasDomainError(VMMError):"""Exception class for AliasDomain exceptions"""passclassAccountError(VMMError):"""Exception class for Account exceptions"""passclassAliasError(VMMError):"""Exception class for Alias exceptions"""passclassEmailAddressError(VMMError):"""Exception class for EmailAddress exceptions"""passclassMailLocationError(VMMError):"""Exception class for MailLocation exceptions"""passclassRelocatedError(VMMError):"""Exception class for Relocated exceptions"""pass