VirtualMailManager/Handler.py
branchv0.6.x
changeset 222 d0c16e70a9fb
parent 221 371ae0b4443d
child 223 5c7b7cbb01cd
--- a/VirtualMailManager/Handler.py	Sat Feb 27 21:36:55 2010 +0000
+++ b/VirtualMailManager/Handler.py	Sun Feb 28 20:51:34 2010 +0000
@@ -547,16 +547,9 @@
             self.__warnings.append(_('Ignored destination addresses:'))
             self.__warnings.extend(('  * %s' % w for w in warnings))
         for destination in destinations:
-            try:
-                gid = get_gid(self._dbh, destination.domainname)
-            except DomainError, e:
-                if e.code == ERR.NO_SUCH_DOMAIN:
-                    continue
-                else:
-                    raise
-            if gid > 0 and \
-                    (not Handler.accountExists(self._dbh, destination) and
-                     not Handler.aliasExists(self._dbh, destination)):
+            gid = get_gid(self._dbh, destination.domainname)
+            if gid and (not Handler.accountExists(self._dbh, destination) and
+                        not Handler.aliasExists(self._dbh, destination)):
                 self.__warnings.append(
                     _(u"The destination account/alias %r doesn't exist.") %
                                        str(destination))