mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +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)
|
||||
"""
|
||||
|
||||
retVal = []
|
||||
|
||||
for name, value in inspect.getmembers(type_):
|
||||
if not name.startswith('__'):
|
||||
if not onlyValues:
|
||||
retVal.append((name, value))
|
||||
yield (name, value)
|
||||
else:
|
||||
retVal.append(value)
|
||||
|
||||
return retVal
|
||||
yield value
|
||||
|
||||
def enumValueToNameLookup(type_, value_):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user