Skip to content

Commit

Permalink
Only set an ERROR state if there's an ERROR handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
zedshaw committed Feb 26, 2013
1 parent e232808 commit 8eb3a3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lamson/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
import re
import logging
import sys
import email.utils
import shelve
import threading

Expand Down Expand Up @@ -379,7 +378,8 @@ def call_safely(self, func, message, kwargs):
except SMTPError:
raise
except:
self.set_state(func.__module__, message, 'ERROR')
if 'ERROR' in dir(sys.modules[func.__module__]):
self.set_state(func.__module__, message, 'ERROR')

if self.UNDELIVERABLE_QUEUE:
self.UNDELIVERABLE_QUEUE.push(message)
Expand Down

0 comments on commit 8eb3a3a

Please sign in to comment.