Mercurial > sqlpython
changeset 9:f70cc3be6377
reporting rowcount
author | devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil |
---|---|
date | Tue, 18 Dec 2007 10:45:45 -0500 |
parents | 8e909570e7de |
children | 2ef0e2608123 |
files | sqlpython.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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: