# HG changeset patch # User catherine@localhost # Date 1217435331 14400 # Node ID 2b42b7bc29cb95c21c5247cf21e302262afd9b4b # Parent 898ed97bec38b7002c796cd53ec20d6e9c8c2b29 commit only if cursor diff -r 898ed97bec38 -r 2b42b7bc29cb sqlpython.py --- a/sqlpython.py Wed Jul 30 11:06:10 2008 -0400 +++ b/sqlpython.py Wed Jul 30 12:28:51 2008 -0400 @@ -143,7 +143,7 @@ def do_rollback(self, arg): self.default('rollback %s;' % (arg), do_everywhere=True) def do_quit(self, arg): - if self.commit_on_exit: + if self.commit_on_exit and hasattr(self, 'curs'): self.default('commit;') cmd2.Cmd.do_quit() do_exit = do_quit