Commits

jayven committed 2e22b03

Fix two logic bugs

Comments (0)

Files changed (2)

         else:
             unregister_exception_callback(id)
         return self.write(cr, uid, ids, {
-            'catch_console_exception': catch_console_exception,
+            'catch_server_exception': catch_server_exception,
         }, context=context)
         
     _name = 'hotdebug.console'

hook_excpetion.py

     Register a thread-local callback that will be called when THIS thread
     has uncaught exception
     '''
-    if getattr(_exception_callback_tls, 'callbacks', None):
+    if getattr(_exception_callback_tls, 'callbacks', None) is None:
         _exception_callback_tls.callbacks = {}
     _exception_callback_tls.callbacks[id] = cb