aboutsummaryrefslogtreecommitdiffstats
path: root/shell.py
diff options
context:
space:
mode:
authorhenryk <henryk@f711b948-2313-0410-aaa9-d29f33439f0b>2005-10-09 02:05:19 +0000
committerhenryk <henryk@f711b948-2313-0410-aaa9-d29f33439f0b>2005-10-09 02:05:19 +0000
commitc584dad0b09227e4150c3c544a1c3f4da275ac1f (patch)
treef91ddc305e364cff87525ba1af6b164d1dbf6b55 /shell.py
parent0f4f8db8958269b25d6b8dc3b39ba5e984a6bd68 (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.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/shell.py b/shell.py
index 03ddf4e..2ef6251 100644
--- a/shell.py
+++ b/shell.py
@@ -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: