Commits

Alexander Shorin  committed 23a3366

Fix broken test.

  • Participants
  • Parent commits 51fc718

Comments (0)

Files changed (1)

File xmppflask/app.py

                 handler = func
                 break
 
-        if handler is None and isinstance(e, NotFound):
-            return u'Message not understood.'
-        elif isinstance(e, NotFound):
-            return handler(e)
+        if handler is None:
+            if isinstance(e, NotFound):
+                return u'Message not understood.'
+            else:
+                self.logger.exception(e)
+                if self.debug:
+                    raise e
         else:
-            self.logger.exception(e)
+            if not isinstance(e, NotFound):
+                self.logger.exception(e)
             return handler(e)
 
         return u'Some application error happened. Probably that\'s my bug :)'