much cleaner approach in that "flat" representation of retrieved items in union technique

This commit is contained in:
Miroslav Stampar
2012-04-03 13:56:11 +00:00
parent 7fb190f3b1
commit 33bb9c5f19
2 changed files with 14 additions and 1 deletions

View File

@@ -2427,6 +2427,18 @@ def unArrayizeValue(value):
return value
def flattenValue(value):
"""
Returns an iterator representing flat representation of a given value
"""
for i in iter(value):
if isinstance(i, (list, tuple)):
for j in flattenValue(i):
yield j
else:
yield i
def getSortedInjectionTests():
"""
Returns prioritized test list by eventually detected DBMS from error