Updated Branches: refs/heads/master 43bd3c3a1 -> fd5421670
Remove redundant code in try..except block Signed-off-by: Prasanna Santhanam <[email protected]> 1350839262 +0530 Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/fd542167 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fd542167 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fd542167 Branch: refs/heads/master Commit: fd5421670dc214d8457078fe4d49d4b042507cdd Parents: 43bd3c3 Author: Prasanna Santhanam <[email protected]> Authored: Sun Oct 21 22:37:42 2012 +0530 Committer: Prasanna Santhanam <[email protected]> Committed: Sun Oct 21 22:39:21 2012 +0530 ---------------------------------------------------------------------- tools/marvin/marvin/dbConnection.py | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/fd542167/tools/marvin/marvin/dbConnection.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/dbConnection.py b/tools/marvin/marvin/dbConnection.py index eb01d73..8fa8643 100644 --- a/tools/marvin/marvin/dbConnection.py +++ b/tools/marvin/marvin/dbConnection.py @@ -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):
