Merge pull request #5 from bl4de/bugfixing

Fixes 'IndexError: list index out of range' in wordpress.py:112 (is_r…
pull/6/head
Swissky 2017-06-17 15:32:45 +02:00 committed by GitHub
commit e37b05e359
1 changed files with 1 additions and 1 deletions

View File

@ -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]))