From bd246f8caa5feb9e60b8ae4f60a58003025596a6 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 13 Jul 2011 22:50:46 +0200 Subject: [PATCH] Using the right exception is better... close #152 --- userprefs/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userprefs/forms.py b/userprefs/forms.py index 49675517b..72c987f2d 100644 --- a/userprefs/forms.py +++ b/userprefs/forms.py @@ -46,7 +46,7 @@ class ForwardForm(forms.Form): raise BadDestination("Invalid mailbox syntax for %s" % d) try: mb = Domain.objects.get(name=domname) - except Mailbox.DoesNotExist: + except Domain.DoesNotExist: self.dests += [d] else: raise BadDestination(_("You can't define a forward to a local destination. Please ask your administrator to create an alias instead."))