[mod] len() removed from conditions

This commit is contained in:
asciimoo 2014-02-11 13:13:51 +01:00
parent 239299d45e
commit c1d7d30b8e
8 changed files with 19 additions and 17 deletions

View file

@ -23,7 +23,7 @@ if xpath_results is a string element, then it's already done
def extract_text(xpath_results):
if type(xpath_results) == list:
# it's list of result : concat everything using recursive call
if not len(xpath_results):
if not xpath_results:
raise Exception('Empty url resultset')
result = ''
for e in xpath_results: