Skip to content

Commit

Permalink
Improve exception raising. Fixes #614
Browse files Browse the repository at this point in the history
  • Loading branch information
camilonova committed Feb 16, 2015
1 parent 3a9ec26 commit 239ddca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_extensions/management/email_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ def execute(self, *args, **options):
"""
try:
super(EmailNotificationCommand, self).execute(*args, **options)
except Exception as e:
except Exception:
if (options.get('email_exception', False) or getattr(self, 'email_exception', False)):
self.send_email_notification(include_traceback=True)
raise e
raise

def send_email_notification(self, notification_id=None,
include_traceback=False, verbosity=1):
Expand Down

0 comments on commit 239ddca

Please sign in to comment.