From 0c2350b069652d448770c365213d50ea07eedfbf Mon Sep 17 00:00:00 2001 From: "bloorq@gmail.com" Date: Fri, 16 Jun 2017 19:37:05 +0100 Subject: [PATCH] Fixes 'IndexError: list index out of range' in wordpress.py:112 (is_readme() method) --- engine/wordpress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/wordpress.py b/engine/wordpress.py index 5a18d10..d55b170 100644 --- a/engine/wordpress.py +++ b/engine/wordpress.py @@ -109,7 +109,7 @@ class Wordpress: regex = re.compile(regex) matches = regex.findall(r.text) - if matches[0] != None and matches[0] != "": + if len(matches) > 0 and matches[0] != None and matches[0] != "": self.version = matches[0] print critical("The Wordpress '%s' file exposing a version number: %s" % (self.url+'readme.html', matches[0]))