From 0ce72cdc8edb3fae2a4d005c895ee052bc8b14b2 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 19 Nov 2009 13:36:56 +0100 Subject: [PATCH] [entropy.transceivers] module cleanup --- libraries/entropy/transceivers.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libraries/entropy/transceivers.py b/libraries/entropy/transceivers.py index 31ad6119f..f61f7a7aa 100644 --- a/libraries/entropy/transceivers.py +++ b/libraries/entropy/transceivers.py @@ -32,7 +32,8 @@ from entropy.i18n import _ from entropy.misc import ParallelTask, Lifo from entropy.core.settings.base import SystemSettings -from entropy.exceptions import * +from entropy.exceptions import UriHandlerNotFound, ConnectionError, \ + TransceiverError class UrlFetcher: @@ -84,10 +85,10 @@ class UrlFetcher: self.__Output = TextInterface() elif not hasattr(self.__Output, 'updateProgress'): mytxt = _("Output interface passed doesn't have the updateProgress method") - raise IncorrectParameter("IncorrectParameter: %s" % (mytxt,)) + raise AttributeError("IncorrectParameter: %s" % (mytxt,)) elif not hasattr(self.__Output.updateProgress, '__call__'): mytxt = _("Output interface passed doesn't have the updateProgress method") - raise IncorrectParameter("IncorrectParameter: %s" % (mytxt,)) + raise AttributeError("IncorrectParameter: %s" % (mytxt,)) def _init_vars(self): self.__resumed = False @@ -453,10 +454,10 @@ class MultipleUrlFetcher: self.__Output = TextInterface() elif not hasattr(self.__Output, 'updateProgress'): mytxt = _("Output interface passed doesn't have the updateProgress method") - raise IncorrectParameter("IncorrectParameter: %s" % (mytxt,)) + raise AttributeError("IncorrectParameter: %s" % (mytxt,)) elif not hasattr(self.__Output.updateProgress, '__call__'): mytxt = _("Output interface passed doesn't have the updateProgress method") - raise IncorrectParameter("IncorrectParameter: %s" % (mytxt,)) + raise AttributeError("IncorrectParameter: %s" % (mytxt,)) self.__url_fetcher = UrlFetcherClass if self.__url_fetcher == None: