VirtualMailManager/Domain.py
branchv0.6.x
changeset 222 d0c16e70a9fb
parent 216 0c8c053b451c
child 225 a51809f7940b
--- a/VirtualMailManager/Domain.py	Sat Feb 27 21:36:55 2010 +0000
+++ b/VirtualMailManager/Domain.py	Sun Feb 28 20:51:34 2010 +0000
@@ -313,9 +313,10 @@
     return order, domdict
 
 def get_gid(dbh, domainname):
-    """Returns the *GID* of the domain *domainname*.
+    """Returns the group id of the domain *domainname*.
 
-    Raises an `DomainError` if the domain does not exist.
+    If the domain couldn't be found in the database 0 will be returned.
+
     """
     domainname = check_domainname(domainname)
     dbc = dbh.cursor()
@@ -324,6 +325,4 @@
     dbc.close()
     if gid:
         return gid[0]
-    else:
-        raise DomErr(_(u"The domain ā€œ%sā€ doesn't exist.") % domainname,
-                     NO_SUCH_DOMAIN)
+    return 0