VirtualMailManager/VirtualMailManager.py
changeset 18 c98e08791ee8
parent 17 fe9be0081e5f
child 19 bf9a03c476fc
--- a/VirtualMailManager/VirtualMailManager.py	Tue Apr 15 01:28:34 2008 +0000
+++ b/VirtualMailManager/VirtualMailManager.py	Tue Apr 15 02:49:21 2008 +0000
@@ -414,13 +414,19 @@
         dom.save()
         self.__domdirmake(dom.getDir(), dom.getID())
 
-    def domain_transport(self, domainname, transport):
+    def domain_transport(self, domainname, transport, force=None):
+        if force is not None and force != 'force':
+            raise VMMDomainException(('Invalid argument: »%s«' % force,
+                ERR.INVALID_OPTION))
         dom = self.__getDomain(domainname, None)
-        dom.updateTransport(transport)
+        if force is None:
+            dom.updateTransport(transport)
+        else:
+            dom.updateTransport(transport, force=True)
 
     def domain_delete(self, domainname, force=None):
         if not force is None and force not in ['deluser','delalias','delall']:
-            raise VMMDomainException(('Invalid argument: «%s»' % force,
+            raise VMMDomainException(('Invalid argument: »%s«' % force,
                 ERR.INVALID_OPTION))
         dom = self.__getDomain(domainname)
         gid = dom.getID()