Using the right exception is better...

close #152
This commit is contained in:
Antoine Nguyen
2011-07-13 22:50:46 +02:00
parent 95f1323b88
commit bd246f8caa
+1 -1
View File
@@ -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."))