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
This commit is contained in:
henryk 2005-10-09 02:05:19 +00:00
parent 0f4f8db895
commit c584dad0b0
1 changed files with 3 additions and 2 deletions

View File

@ -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: