mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-26 11:14:23 +01:00
@@ -0,0 +1,23 @@
|
||||
# coding: utf-8
|
||||
"""
|
||||
:mod:`exceptions` --- Custom Modoboa exceptions
|
||||
-----------------------------------------------
|
||||
|
||||
"""
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
class ModoboaException(Exception):
|
||||
pass
|
||||
|
||||
class PermDeniedException(ModoboaException):
|
||||
def __init__(self, msg=None):
|
||||
self.msg = msg
|
||||
|
||||
def __str__(self):
|
||||
if self.msg:
|
||||
return _("Permission denied: %s" % self.msg)
|
||||
return _("Permission denied")
|
||||
|
||||
class NeedsMailboxException(ModoboaException):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user