fix for a bug reported by nightman (AttributeError: 'list' object has no attribute 'split')

This commit is contained in:
Miroslav Stampar
2011-03-07 09:50:43 +00:00
parent 7524a0c0cf
commit 16b286982d
2 changed files with 16 additions and 4 deletions

View File

@@ -2195,6 +2195,17 @@ def arrayizeValue(value):
return value
def unArrayizeValue(value):
"""
Makes a value out of iterable if it is a list, tuple or set
itself
"""
if isinstance(value, (list, tuple, set)):
value = value[0] if len(value) > 0 else None
return value
def getSortedInjectionTests():
"""
Returns prioritized test list by eventually detected DBMS from error