Remove redundant code in try..except block

Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1350839262 +0530
This commit is contained in:
Prasanna Santhanam 2012-10-21 22:37:42 +05:30
parent 43bd3c3a17
commit fd5421670d

View File

@ -42,13 +42,10 @@ class dbConnection(object):
with contextlib.closing(conn.cursor(buffered=True)) as cursor:
cursor.execute(sql, params)
try:
result = cursor.fetchall()
resultRow = cursor.fetchall()
except errors.InterfaceError:
#Raised on empty result - DML
result = []
if result:
[resultRow.append(r) for r in result]
resultRow = []
return resultRow
def executeSqlFromFile(self, fileName=None):