Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Remove quotes from item_error message

Eugenio Lacuestafacb9265421e
diff --git a/scrapy/logformatter.py b/scrapy/logformatter.py
index 79c752da4..9e038160f 100644
--- a/scrapy/logformatter.py
+++ b/scrapy/logformatter.py
@@ -5,10 +5,10 @@ from twisted.python.failure import Failure
from scrapy.utils.request import referer_str
-SCRAPEDMSG = u"Scraped from %(src)s" + os.linesep + "%(item)s"
-DROPPEDMSG = u"Dropped: %(exception)s" + os.linesep + "%(item)s"
-CRAWLEDMSG = u"Crawled (%(status)s) %(request)s%(request_flags)s (referer: %(referer)s)%(response_flags)s"
-ITEMERRORMSG = u"'Error processing %(item)s'"
+SCRAPEDMSG = "Scraped from %(src)s" + os.linesep + "%(item)s"
+DROPPEDMSG = "Dropped: %(exception)s" + os.linesep + "%(item)s"
+CRAWLEDMSG = "Crawled (%(status)s) %(request)s%(request_flags)s (referer: %(referer)s)%(response_flags)s"
+ITEMERRORMSG = "Error processing %(item)s"
class LogFormatter(object):
diff --git a/tests/test_logformatter.py b/tests/test_logformatter.py
index f2f8c0464..990927f71 100644
--- a/tests/test_logformatter.py
+++ b/tests/test_logformatter.py
@@ -71,7 +71,7 @@ class LogFormatterTestCase(unittest.TestCase):
response = Response("http://www.example.com")
logkws = self.formatter.item_error(item, exception, response, self.spider)
logline = logkws['msg'] % logkws['args']
- self.assertEqual(logline, u"'Error processing {'key': 'value'}'")
+ self.assertEqual(logline, u"Error processing {'key': 'value'}")
def test_scraped(self):
item = CustomItem()