Changed NotImplementedException to NotImplementedError

It seems NotImplementedException does not exist. It must be a relic
from old Python...

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
Abdó Roig-Maranges 2012-10-18 19:23:34 +02:00 committed by Eygene Ryabinkin
parent 6cbd2498ae
commit 697ca8a229

View File

@ -115,7 +115,7 @@ class BaseFolder(object):
def getcopyinstancelimit(self): def getcopyinstancelimit(self):
"""For threading folders, returns the instancelimitname for """For threading folders, returns the instancelimitname for
InstanceLimitedThreads.""" InstanceLimitedThreads."""
raise NotImplementedException raise NotImplementedError
def storesmessages(self): def storesmessages(self):
"""Should be true for any backend that actually saves message bodies. """Should be true for any backend that actually saves message bodies.
@ -211,18 +211,18 @@ class BaseFolder(object):
This function needs to be implemented by each Backend This function needs to be implemented by each Backend
:returns: UIDVALIDITY as a (long) number""" :returns: UIDVALIDITY as a (long) number"""
raise NotImplementedException raise NotImplementedError
def cachemessagelist(self): def cachemessagelist(self):
"""Reads the message list from disk or network and stores it in """Reads the message list from disk or network and stores it in
memory for later use. This list will not be re-read from disk or memory for later use. This list will not be re-read from disk or
memory unless this function is called again.""" memory unless this function is called again."""
raise NotImplementedException raise NotImplementedError
def getmessagelist(self): def getmessagelist(self):
"""Gets the current message list. """Gets the current message list.
You must call cachemessagelist() before calling this function!""" You must call cachemessagelist() before calling this function!"""
raise NotImplementedException raise NotImplementedError
def uidexists(self, uid): def uidexists(self, uid):
"""Returns True if uid exists""" """Returns True if uid exists"""
@ -239,7 +239,7 @@ class BaseFolder(object):
def getmessage(self, uid): def getmessage(self, uid):
"""Returns the content of the specified message.""" """Returns the content of the specified message."""
raise NotImplementedException raise NotImplementedError
def savemessage(self, uid, content, flags, rtime): def savemessage(self, uid, content, flags, rtime):
"""Writes a new message, with the specified uid. """Writes a new message, with the specified uid.
@ -263,15 +263,15 @@ class BaseFolder(object):
so you need to ensure that savemessage is never called in a so you need to ensure that savemessage is never called in a
dryrun mode. dryrun mode.
""" """
raise NotImplementedException raise NotImplementedError
def getmessagetime(self, uid): def getmessagetime(self, uid):
"""Return the received time for the specified message.""" """Return the received time for the specified message."""
raise NotImplementedException raise NotImplementedError
def getmessageflags(self, uid): def getmessageflags(self, uid):
"""Returns the flags for the specified message.""" """Returns the flags for the specified message."""
raise NotImplementedException raise NotImplementedError
def savemessageflags(self, uid, flags): def savemessageflags(self, uid, flags):
"""Sets the specified message's flags to the given set. """Sets the specified message's flags to the given set.
@ -279,7 +279,7 @@ class BaseFolder(object):
Note that this function does not check against dryrun settings, Note that this function does not check against dryrun settings,
so you need to ensure that it is never called in a so you need to ensure that it is never called in a
dryrun mode.""" dryrun mode."""
raise NotImplementedException raise NotImplementedError
def addmessageflags(self, uid, flags): def addmessageflags(self, uid, flags):
"""Adds the specified flags to the message's flag set. If a given """Adds the specified flags to the message's flag set. If a given
@ -327,14 +327,14 @@ class BaseFolder(object):
:param new_uid: (optional) If given, the old UID will be changed :param new_uid: (optional) If given, the old UID will be changed
to a new UID. This allows backends efficient renaming of to a new UID. This allows backends efficient renaming of
messages if the UID has changed.""" messages if the UID has changed."""
raise NotImplementedException raise NotImplementedError
def deletemessage(self, uid): def deletemessage(self, uid):
""" """
Note that this function does not check against dryrun settings, Note that this function does not check against dryrun settings,
so you need to ensure that it is never called in a so you need to ensure that it is never called in a
dryrun mode.""" dryrun mode."""
raise NotImplementedException raise NotImplementedError
def deletemessages(self, uidlist): def deletemessages(self, uidlist):
""" """