mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
Dealing with deprecated next()
This commit is contained in:
10
thirdparty/beautifulsoup/beautifulsoup.py
vendored
10
thirdparty/beautifulsoup/beautifulsoup.py
vendored
@@ -370,7 +370,7 @@ class PageElement(object):
|
||||
g = generator()
|
||||
while True:
|
||||
try:
|
||||
i = g.next()
|
||||
i = next(g)
|
||||
except StopIteration:
|
||||
break
|
||||
if i:
|
||||
@@ -470,7 +470,7 @@ class NavigableString(unicode, PageElement):
|
||||
if attr == 'string':
|
||||
return self
|
||||
else:
|
||||
raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr)
|
||||
raise AttributeError("'%s' object has no attribute '%s'" % (self.__class__.__name__, attr))
|
||||
|
||||
def __unicode__(self):
|
||||
return str(self).decode(DEFAULT_OUTPUT_ENCODING)
|
||||
@@ -668,7 +668,7 @@ class Tag(PageElement):
|
||||
return self.find(tag[:-3])
|
||||
elif tag.find('__') != 0:
|
||||
return self.find(tag)
|
||||
raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__, tag)
|
||||
raise AttributeError("'%s' object has no attribute '%s'" % (self.__class__, tag))
|
||||
|
||||
def __eq__(self, other):
|
||||
"""Returns true iff this tag has the same name, the same attributes,
|
||||
@@ -974,8 +974,8 @@ class SoupStrainer:
|
||||
if self._matches(markup, self.text):
|
||||
found = markup
|
||||
else:
|
||||
raise Exception, "I don't know how to match against a %s" \
|
||||
% markup.__class__
|
||||
raise Exception("I don't know how to match against a %s" \
|
||||
% markup.__class__)
|
||||
return found
|
||||
|
||||
def _matches(self, markup, matchAgainst):
|
||||
|
||||
Reference in New Issue
Block a user