1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-23 16:24:18 +00:00

simplify porting to Python 3

This commit is contained in:
Max Arnold 2013-12-17 23:19:40 +07:00
parent 86a6d6898b
commit 220ced163c
2 changed files with 3 additions and 3 deletions

View File

@ -276,7 +276,7 @@ class FilesPipeline(MediaPipeline):
category=ScrapyDeprecationWarning, stacklevel=1)
# check if called from file_key with url as first argument
if isinstance(request, unicode) or isinstance(request, str):
if not isinstance(request, Request):
_warn()
url = request
else:

View File

@ -118,7 +118,7 @@ class ImagesPipeline(FilesPipeline):
category=ScrapyDeprecationWarning, stacklevel=1)
# check if called from image_key or file_key with url as first argument
if isinstance(request, unicode) or isinstance(request, str):
if not isinstance(request, Request):
_warn()
url = request
else:
@ -146,7 +146,7 @@ class ImagesPipeline(FilesPipeline):
category=ScrapyDeprecationWarning, stacklevel=1)
# check if called from thumb_key with url as first argument
if isinstance(request, unicode) or isinstance(request, str):
if not isinstance(request, Request):
_warn()
url = request
else: