VirtualMailManager/Exceptions.py
author Pascal Volk <neverseen@users.sourceforge.net>
Mon, 18 Aug 2008 01:56:31 +0000
changeset 47 191d5a5adc4a
parent 32 ceb700bc4a80
child 48 0d5f58f8b8f5
permissions -rw-r--r--
* Removed gettext import and setup in VirtualMailManager/: - 'Account.py' - 'Alias.py' - 'Config.py' - 'Domain.py' - 'MailLocation.py' - 'Transport.py' - 'VirtualMailManager.py' * 'VirtualMailManager/VirtualMailManager.py' - Renamed methods in class VirtualMailManager: + __chkLocalpart() -> chkLocalpart() + __chkDomainname() -> chkDomainname() + __chkEmailAddress() -> chkEmailAddress() - VirtualMailManager.chkLocalpart() check also for len() < 1 *Oops* - VirtualMailManager.user_delete() explains why the home directory couldn't be deleted, if it wasn't deleted. * 'VirtualMailManager/Account.py' - Account.__init__() checks address with VirtualMailManager.chkEmailAddress() * 'VirtualMailManager/Exceptions.py' - Added class VMMDomainAliasException * 'vmm' - Implemented: w_err(), w_std() - Uses gettexts install() - Converts all args from sys.argv to unicode - available via global argv - Replaced many sys.argv by argv * 'po/de.po' * 'po/vmm.pot' - updated

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Copyright 2007-2008 VEB IT
# See COPYING for distribution information.
# $Id$

"""Exception classes for Virtual Mail Manager"""

from constants.VERSION import VERSION

__author__ = 'Pascal Volk <p.volk@veb-it.de>'
__version__ = VERSION
__revision__ = 'rev '+'$Rev$'.split()[1]
__date__ = '$Date$'.split()[1]

class VMMException(Exception):
    """Exception class for VirtualMailManager exceptions"""
    def __init__(self, msg):
        Exception.__init__(self, msg)

class VMMConfigException(Exception):
    """Exception class for Configurtion exceptions"""
    def __init__(self, msg):
        Exception.__init__(self, msg)

class VMMPermException(Exception):
    """Exception class for permissions exceptions"""
    pass

class VMMNotRootException(Exception):
    """Exception class for non-root exceptions"""
    def __init__(self, msg):
        Exception.__init__(self, msg)

class VMMDomainException(VMMException):
    """Exception class for Domain exceptions"""
    def __init__(self, msg):
        VMMException.__init__(self, msg)

class VMMDomainAliasException(VMMException):
    """Exception class for DomainAlias exceptions"""
    def __init__(self, msg):
        VMMException.__init__(self, msg)

class VMMAccountException(VMMException):
    """Exception class for Account exceptions"""
    def __init__(self, msg):
        VMMException.__init__(self, msg)

class VMMAliasException(VMMException):
    """Exception class for Alias exceptions"""
    def __init__(self, msg):
        VMMException.__init__(self, msg)

class VMMMailLocationException(VMMException):
    """Exception class for MailLocation exceptions"""
    def __init__(self, msg):
        VMMException.__init__(self, msg)

class VMMTransportException(VMMException):
    """Exception class for Transport exceptions"""
    def __init__(self, msg):
        VMMException.__init__(self, msg)