mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
minor yielding
This commit is contained in:
parent
a5ad4621c9
commit
dfe81cc66f
|
@ -2016,16 +2016,12 @@ def getPublicTypeMembers(type_, onlyValues=False):
|
||||||
Useful for getting members from types (e.g. in enums)
|
Useful for getting members from types (e.g. in enums)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retVal = []
|
|
||||||
|
|
||||||
for name, value in inspect.getmembers(type_):
|
for name, value in inspect.getmembers(type_):
|
||||||
if not name.startswith('__'):
|
if not name.startswith('__'):
|
||||||
if not onlyValues:
|
if not onlyValues:
|
||||||
retVal.append((name, value))
|
yield (name, value)
|
||||||
else:
|
else:
|
||||||
retVal.append(value)
|
yield value
|
||||||
|
|
||||||
return retVal
|
|
||||||
|
|
||||||
def enumValueToNameLookup(type_, value_):
|
def enumValueToNameLookup(type_, value_):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user