Skip to content

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

remove undefined variable from image pipeline

Daniel Granabdc0ec686325
diff --git a/scrapy/contrib/pipeline/images.py b/scrapy/contrib/pipeline/images.py
index 77e9afb98..4ffc4f197 100644
--- a/scrapy/contrib/pipeline/images.py
+++ b/scrapy/contrib/pipeline/images.py
@@ -66,8 +66,8 @@ class BaseImagesPipeline(MediaPipeline):
referer = request.headers.get('Referer')
if response.status != 200:
- msg = 'Image (http-error): Error downloading %s from %s referred in <%s>: %s' \
- % (mtype, request, referer, errmsg)
+ msg = 'Image (http-error): Error downloading %s from %s referred in <%s>' \
+ % (mtype, request, referer)
log.msg(msg, level=log.WARNING, domain=info.domain)
raise ImageException(msg)