# HG changeset patch # User devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil # Date 1197992745 18000 # Node ID f70cc3be6377fa7bcf82549ff2045b7ae3b6b4c4 # Parent 8e909570e7de9a2795f3d639b9a1273ffa6cf5d3 reporting rowcount diff -r 8e909570e7de -r f70cc3be6377 sqlpython.py --- a/sqlpython.py Thu Dec 06 10:37:59 2007 -0500 +++ b/sqlpython.py Tue Dec 18 10:45:45 2007 -0500 @@ -98,12 +98,12 @@ '''Sends a command to a Senora session (http://senora.sourceforge.net/)''' self.designated_session(arg, pexpecter.SenoraSession) do_sen = do_senora - + def default(self, arg, do_everywhere = False): - self.query = finishStatement(arg) + self.query = finishStatement(arg).strip().rstrip(';') try: self.curs.execute(self.query) - print '\nExecuted\n' + print '\nExecuted%s\n' % ((self.curs.rowcount > 0) and ' (%d rows)' % self.curs.rowcount or '') if do_everywhere: self.fail(arg, do_everywhere = True ) except Exception, e: