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:
parent
0f4f8db895
commit
c584dad0b0
5
shell.py
5
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:
|
||||
|
|
Loading…
Reference in New Issue