From 2bb6ed68676c08bc2eccd035638dfba72269c9ed Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 8 Jun 2018 16:54:15 +0200 Subject: [PATCH] Declared logger attribute in HttpRequest as it won't be available to the subclasses otherwise --- platypush/backend/http/request/__init__.py | 1 + platypush/backend/http/request/rss/__init__.py | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/platypush/backend/http/request/__init__.py b/platypush/backend/http/request/__init__.py index e5b273c40..b47a53f59 100644 --- a/platypush/backend/http/request/__init__.py +++ b/platypush/backend/http/request/__init__.py @@ -33,6 +33,7 @@ class HttpRequest(object): self.bus = bus self.skip_first_call = skip_first_call self.last_request_timestamp = 0 + self.logger = logging.getLogger(__name__) if isinstance(args, self.HttpRequestArguments): self.args = args diff --git a/platypush/backend/http/request/rss/__init__.py b/platypush/backend/http/request/rss/__init__.py index b65acd836..86e91282f 100644 --- a/platypush/backend/http/request/rss/__init__.py +++ b/platypush/backend/http/request/rss/__init__.py @@ -28,9 +28,7 @@ class RssUpdates(HttpRequest): user_agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36' def __init__(self, url, title=None, headers=None, params=None, max_entries=None, - mercury_api_key=None, digest_format=None, *args, **kwargs): - super().__init__(*args, **kwargs) - + mercury_api_key=None, digest_format=None, *argv, **kwargs): self.url = url self.title = title self.max_entries = max_entries @@ -49,7 +47,7 @@ class RssUpdates(HttpRequest): 'params': params or {}, } - super().__init__(*args, skip_first_call=False, args=request_args, **kwargs) + super().__init__(skip_first_call=False, args=request_args, *argv, **kwargs) def _get_or_create_source(self, session): record = session.query(FeedSource).filter_by(url=self.url).first()