Fix for an Issue #158

This commit is contained in:
Miroslav Stampar 2012-08-21 20:20:38 +02:00
parent f098955081
commit ebab05cf7c

View File

@ -223,9 +223,9 @@ class xp_cmdshell:
inject.goStacked("DELETE FROM %s" % self.cmdTblName) inject.goStacked("DELETE FROM %s" % self.cmdTblName)
if output and isListLike(output) and len(output) > 1: if output and isListLike(output) and len(output) > 1:
if not output[0].strip(): if not (output[0] or "").strip():
output = output[1:] output = output[1:]
elif not output[-1].strip(): elif not (output[-1] or "").strip():
output = output[:-1] output = output[:-1]
output = "\n".join(line for line in output) output = "\n".join(line for line in output)