Uninvite functions on error

If a function responding to an event has an unhandled exception, we
print a message telling what went wrong and that the function has been
uninvited.  However, I never actually uninvite the function from the
event.  I have now added in a call to uninvite() before printing the
message.
This commit is contained in:
Bryan Schumaker 2010-10-25 09:48:24 -04:00
parent b69e790186
commit 43eab40b01
1 changed files with 1 additions and 0 deletions

View File

@ -40,6 +40,7 @@ def start(key, *args):
else:
start_thread(func, *args)
except Exception,e:
uninvite(key, func)
print
print "===== EVENT ERROR ====="
print "Event:", key