From 4c2a9d256623360b34a37dbde19531919af41c21 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Mon, 23 Nov 2015 23:14:17 +0100 Subject: replace all " with ' --- watchnews/fetch.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'watchnews/fetch.py') diff --git a/watchnews/fetch.py b/watchnews/fetch.py index 5201c1e..e6c5c39 100755 --- a/watchnews/fetch.py +++ b/watchnews/fetch.py @@ -9,7 +9,7 @@ from newspaper.cleaners import DocumentCleaner import logging def update(feed): - logging.info("Update %s", feed.url) + logging.info('Update %s', feed.url) result = feedparser.parse(feed.url) if result['feed']['title'] != feed.title: feed.title = result['feed']['title'] @@ -44,7 +44,7 @@ def update(feed): version.url = entry['link'] authors = paper.authors authors.sort() - version.authors = ", ".join(authors) + version.authors = ', '.join(authors) version.title = paper.title version.text = paper.text @@ -64,7 +64,7 @@ def update(feed): version.text = text if len(version.text) < 2: # less than 2 chars is likely failure - raise Exception("failed to parse {}\n{}".format(entry,version)) + raise Exception('failed to parse {}\n{}'.format(entry,version)) # search if the previous version was the same ident_version = data.Version.select().where( @@ -74,10 +74,10 @@ def update(feed): (data.Version.text == version.text)).first() if ident_version: - logging.info("No change, skip %s", item.uid) + logging.info('No change, skip %s', item.uid) else: version.save() - logging.info("Saved new version of %s: %s", item.uid, version.id) + logging.info('Saved new version of %s: %s', item.uid, version.id) except Exception as e: - logging.exception("Failed to process %s", entry['link']) + logging.exception('Failed to process %s', entry['link']) -- cgit v1.2.1