Skip to content

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

rel_has_nofollow: remove redundant if statement

John de la Garzab02d26fae889
diff --git a/scrapy/utils/misc.py b/scrapy/utils/misc.py
index 5ccfdcd72..6de36d45c 100644
--- a/scrapy/utils/misc.py
+++ b/scrapy/utils/misc.py
@@ -116,7 +116,7 @@ def md5sum(file):
def rel_has_nofollow(rel):
"""Return True if link rel attribute has nofollow type"""
- return True if rel is not None and 'nofollow' in rel.split() else False
+ return rel is not None and 'nofollow' in rel.split()
def create_instance(objcls, settings, crawler, *args, **kwargs):