forked from platypush/platypush
Redirect mercury-parser.js stderr to stdout. Moreover, if an error occurs while parsing a link from an RSS feed we should report the link that raised the error, not the URL of the parent feed
This commit is contained in:
parent
44e27e6c62
commit
1f2f293778
2 changed files with 2 additions and 2 deletions
|
@ -146,7 +146,7 @@ class RssUpdates(HttpRequest):
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.warning('Exception encountered while parsing RSS ' +
|
self.logger.warning('Exception encountered while parsing RSS ' +
|
||||||
'RSS feed {}: {}'.format(self.url, str(e)))
|
'RSS feed {}: {}'.format(entry.link, str(e)))
|
||||||
self.logger.exception(e)
|
self.logger.exception(e)
|
||||||
|
|
||||||
source_record.last_updated_at = parse_start_time
|
source_record.last_updated_at = parse_start_time
|
||||||
|
|
|
@ -55,7 +55,7 @@ class HttpWebpagePlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.logger.info('Parsing URL {}'.format(url))
|
self.logger.info('Parsing URL {}'.format(url))
|
||||||
parser = subprocess.Popen(['node', self._mercury_script, url], stdout=subprocess.PIPE)
|
parser = subprocess.Popen(['node', self._mercury_script, url], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
response = parser.stdout.read().decode()
|
response = parser.stdout.read().decode()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue