From d2cf355753351ff805c6da362fbbb4599350cf81 Mon Sep 17 00:00:00 2001 From: lxnay Date: Fri, 20 Mar 2009 12:26:01 +0000 Subject: [PATCH] Entropy/exceptions: - remove SystemError and NotImplementedError exceptions - pylint test passed git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3211 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/entropy/exceptions.py | 74 ++++++++++++++++----------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/libraries/entropy/exceptions.py b/libraries/entropy/exceptions.py index 84ef07899..3a5281cf9 100644 --- a/libraries/entropy/exceptions.py +++ b/libraries/entropy/exceptions.py @@ -22,11 +22,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ''' +# pylint ok class EntropyException(Exception): """General superclass for Entropy exceptions""" - def __init__(self,value): + def __init__(self, value): self.value = value[:] + Exception.__init__(self) def __str__(self): if isinstance(self.value, basestring): @@ -35,98 +37,96 @@ class EntropyException(Exception): return repr(self.value) class CorruptionError(EntropyException): - """Corruption indication""" + """Corruption indication""" class CacheCorruptionError(EntropyException): - """On-Disk cache Corruption indication""" + """On-Disk cache Corruption indication""" class InvalidDependString(EntropyException): - """An invalid depend string has been encountered""" + """An invalid depend string has been encountered""" class InvalidVersionString(EntropyException): - """An invalid version string has been encountered""" + """An invalid version string has been encountered""" class SecurityViolation(EntropyException): - """An incorrect formatting was passed instead of the expected one""" + """An incorrect formatting was passed instead of the expected one""" class IncorrectParameter(EntropyException): - """A parameter of the wrong type was passed""" + """A parameter of the wrong type was passed""" class MissingParameter(EntropyException): - """A parameter is required for the action requested but was not passed""" + """A parameter is required for the action requested but was not passed""" class ParseError(EntropyException): - """An error was generated while attempting to parse the request""" + """An error was generated while attempting to parse the request""" class InvalidData(EntropyException): - """An incorrect formatting was passed instead of the expected one""" + """An incorrect formatting was passed instead of the expected one""" class InvalidDataType(EntropyException): - """An incorrect type was passed instead of the expected one""" + """An incorrect type was passed instead of the expected one""" class RepositoryError(EntropyException): - """Cannot open repository database""" + """Cannot open repository database""" class ConnectionError(EntropyException): - """Cannot connect to service""" - -class NotImplementedError(EntropyException): - """Feature not implemented""" + """Cannot connect to service""" class InterruptError(EntropyException): - """Raised to interrupt a thread or process""" + """Raised to interrupt a thread or process""" class FtpError(EntropyException): - """FTP errors""" + """FTP errors""" class SystemDatabaseError(EntropyException): - """Cannot open system database""" + """Cannot open system database""" class SPMError(EntropyException): - """Source Package Manager generic errors""" + """Source Package Manager generic errors""" class OnlineMirrorError(EntropyException): - """Mirror issue""" + """Mirror issue""" class QueueError(EntropyException): - """Action queue issue""" + """Action queue issue""" class InvalidLocation(EntropyException): - """Data was not found when it was expected to exist or was specified incorrectly""" + """ + Data was not found when it was expected to exist or + was specified incorrectly + """ class InvalidAtom(EntropyException): - """Atom not properly formatted""" + """Atom not properly formatted""" class InvalidPackageSet(EntropyException): - """Package set does not exist""" + """Package set does not exist""" class FileNotFound(InvalidLocation): - """A file was not found when it was expected to exist""" + """A file was not found when it was expected to exist""" class DirectoryNotFound(InvalidLocation): - """A directory was not found when it was expected to exist""" + """A directory was not found when it was expected to exist""" class OperationNotPermitted(EntropyException): - """An operation was not permitted operating system""" + """An operation was not permitted operating system""" class PermissionDenied(EntropyException): - from errno import EACCES as errno - """Permission denied""" + """Permission denied""" + from errno import EACCES as errno class ReadOnlyFileSystem(EntropyException): - """Read-only file system""" + """Read-only file system""" class CommandNotFound(EntropyException): - """A required binary was not available or executable""" + """A required binary was not available or executable""" class LibraryNotFound(EntropyException): - """A required library was not available or executable""" + """A required library was not available or executable""" class SSLError(EntropyException): - """SSL support is not available""" + """SSL support is not available""" class EntropyPackageException(EntropyException): - """Malformed or missing package data""" + """Malformed or missing package data""" -class SystemError(EntropyException): - """General System Error""" \ No newline at end of file