File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,16 +138,19 @@ def get_result(self, cursor):
138138 # e.g. SELECT.
139139 if cursor .description is not None :
140140 headers = [x [0 ] for x in cursor .description ]
141- status = "{0 } row{1 } in set"
141+ status = "{count } row{s } in set"
142142 cursor = list (cursor )
143143 rowcount = len (cursor )
144144 else :
145145 _logger .debug ("No rows in result." )
146- status = "Query OK, {0} row{1} affected"
147- rowcount = 0 if cursor .rowcount == - 1 else cursor .rowcount
146+ if cursor .rowcount == - 1 :
147+ status = "Query OK"
148+ else :
149+ status = "Query OK, {count} row{s} affected"
150+ rowcount = cursor .rowcount
148151 cursor = None
149152
150- status = status .format (rowcount , "" if rowcount == 1 else "s" )
153+ status = status .format (count = rowcount , s = "" if rowcount == 1 else "s" )
151154
152155 return (title , cursor , headers , status )
153156
You can’t perform that action at this time.
0 commit comments