preventing crashes for output=[]

This commit is contained in:
Miroslav Stampar 2011-02-07 10:24:15 +00:00
parent 096efea282
commit c0233dcd4f

View File

@ -95,10 +95,10 @@ class UDF:
output = inject.getValue("SELECT %s FROM %s" % (self.tblField, self.cmdTblName), resumeValue=False, firstChar=first, lastChar=last)
inject.goStacked("DELETE FROM %s" % self.cmdTblName)
if isinstance(output, (list, tuple)):
if output and isinstance(output, (list, tuple)):
output = output[0]
if isinstance(output, (list, tuple)):
if output and isinstance(output, (list, tuple)):
output = output[0]
return output