From ea3de16f248fcac90085241d3894346fbf09aed1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 13 Sep 2019 11:38:26 +0200 Subject: [PATCH] Implementing PEP 479 (fixes #3924) --- lib/core/settings.py | 2 +- lib/core/wordlist.py | 2 +- thirdparty/beautifulsoup/beautifulsoup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 78b27c896..236aef283 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.9.11" +VERSION = "1.3.9.12" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/core/wordlist.py b/lib/core/wordlist.py index 1b4d5b048..a200e5376 100644 --- a/lib/core/wordlist.py +++ b/lib/core/wordlist.py @@ -42,7 +42,7 @@ class Wordlist(six.Iterator): def adjust(self): self.closeFP() if self.index > len(self.filenames): - raise StopIteration + return # Note: https://stackoverflow.com/a/30217723 (PEP 479) elif self.index == len(self.filenames): self.iter = iter(self.custom) else: diff --git a/thirdparty/beautifulsoup/beautifulsoup.py b/thirdparty/beautifulsoup/beautifulsoup.py index a4e6e7fc8..0837bf72c 100644 --- a/thirdparty/beautifulsoup/beautifulsoup.py +++ b/thirdparty/beautifulsoup/beautifulsoup.py @@ -894,7 +894,7 @@ class Tag(PageElement): def recursiveChildGenerator(self): if not len(self.contents): - raise StopIteration + return # Note: https://stackoverflow.com/a/30217723 (PEP 479) stopNode = self._lastRecursiveChild().next current = self.contents[0] while current is not stopNode: