forked from platypush/platypush
Declared logger attribute in HttpRequest as it won't be available to the subclasses otherwise
This commit is contained in:
parent
f0bb2a20b0
commit
2bb6ed6867
2 changed files with 3 additions and 4 deletions
|
@ -33,6 +33,7 @@ class HttpRequest(object):
|
||||||
self.bus = bus
|
self.bus = bus
|
||||||
self.skip_first_call = skip_first_call
|
self.skip_first_call = skip_first_call
|
||||||
self.last_request_timestamp = 0
|
self.last_request_timestamp = 0
|
||||||
|
self.logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
if isinstance(args, self.HttpRequestArguments):
|
if isinstance(args, self.HttpRequestArguments):
|
||||||
self.args = args
|
self.args = args
|
||||||
|
|
|
@ -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'
|
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,
|
def __init__(self, url, title=None, headers=None, params=None, max_entries=None,
|
||||||
mercury_api_key=None, digest_format=None, *args, **kwargs):
|
mercury_api_key=None, digest_format=None, *argv, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
self.url = url
|
self.url = url
|
||||||
self.title = title
|
self.title = title
|
||||||
self.max_entries = max_entries
|
self.max_entries = max_entries
|
||||||
|
@ -49,7 +47,7 @@ class RssUpdates(HttpRequest):
|
||||||
'params': params or {},
|
'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):
|
def _get_or_create_source(self, session):
|
||||||
record = session.query(FeedSource).filter_by(url=self.url).first()
|
record = session.query(FeedSource).filter_by(url=self.url).first()
|
||||||
|
|
Loading…
Reference in a new issue