diff options
author | henryk <henryk@f711b948-2313-0410-aaa9-d29f33439f0b> | 2005-10-09 02:05:19 +0000 |
---|---|---|
committer | henryk <henryk@f711b948-2313-0410-aaa9-d29f33439f0b> | 2005-10-09 02:05:19 +0000 |
commit | c584dad0b09227e4150c3c544a1c3f4da275ac1f (patch) | |
tree | f91ddc305e364cff87525ba1af6b164d1dbf6b55 /shell.py | |
parent | 0f4f8db8958269b25d6b8dc3b39ba5e984a6bd68 (diff) |
post_hook execution moved to after command execution
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@39 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'shell.py')
-rw-r--r-- | shell.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -82,8 +82,6 @@ class Shell: line = raw_input("%s> " % self.prompt) - for function in self.post_hook: - function() except EOFError: print ## line break (there probably was none after the prompt) break @@ -92,6 +90,9 @@ class Shell: try: self.parse_and_execute(line) + + for function in self.post_hook: + function() except Exception: exctype, value = sys.exc_info()[:2] if exctype == exceptions.SystemExit: |