# HG changeset patch # User catherine@Elli.myhome.westell.com # Date 1238123629 14400 # Node ID 2e37155d2b95cba17a6f99e92579c811675e40d7 # Parent 2cda5a817e5a3f68c31e4aa9ff7a5d2f160ac221 history fix diff -r 2cda5a817e5a -r 2e37155d2b95 cmd2.py --- a/cmd2.py Wed Mar 25 19:15:43 2009 -0400 +++ b/cmd2.py Thu Mar 26 23:13:49 2009 -0400 @@ -588,7 +588,8 @@ except Exception, e: print e return 0 - + if statement.parsed.command not in self.excludeFromHistory: + self.history.append(statement.parsed.raw) try: (stop, statement) = self.postparsing_precmd(statement) except Exception, e: @@ -642,9 +643,6 @@ print 'Elapsed: %s' % str(datetime.datetime.now() - timestart) except Exception, e: print e - try: - if statement.parsed.command not in self.excludeFromHistory: - self.history.append(statement.parsed.raw) finally: if statekeeper: if statement.parsed.output and not statement.parsed.outputTo: