diff sqlpython.py @ 124:2b42b7bc29cb 1.4.7

commit only if cursor
author catherine@localhost
date Wed, 30 Jul 2008 12:28:51 -0400
parents 898ed97bec38
children d0e071e19c26
line wrap: on
line diff
--- 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