Mercurial > sqlpython
changeset 472:9f58d8f807d3
fix exit-on-blank-first-line bug
author | catherine@dellzilla |
---|---|
date | Wed, 03 Mar 2010 13:49:08 -0500 |
parents | dfe5a19e7390 |
children | d710a48e6fb7 |
files | sqlpython/sqlpython.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/sqlpython/sqlpython.py Wed Mar 03 13:25:43 2010 -0500 +++ b/sqlpython/sqlpython.py Wed Mar 03 13:49:08 2010 -0500 @@ -194,8 +194,11 @@ pass return stop, statement def postparsing_postcmd(self, stop): - if self.saved_instance_number is not None: - self.successfully_connect_to_number(self.saved_instance_number) + try: + if self.saved_instance_number is not None: + self.successfully_connect_to_number(self.saved_instance_number) + except AttributeError: + pass # no saved_instance_number has been defined return stop do_host = cmd2.Cmd.do_shell