# HG changeset patch
# User Pascal Volk <user@localhost.localdomain.org>
# Date 1339689969 0
# Node ID 1498abbb6c91b1204a073ef32829ebdd4508064d
# Parent  fbbb16476c5beb05c4b639ef4ca6cba93b5bf0c5
VMM/handler: Restored method Handler.domain_transport().
It went somehow lost with changeset 5806fb74130b.

diff -r fbbb16476c5b -r 1498abbb6c91 VirtualMailManager/handler.py
--- a/VirtualMailManager/handler.py	Thu May 31 18:48:00 2012 +0000
+++ b/VirtualMailManager/handler.py	Thu Jun 14 16:06:09 2012 +0000
@@ -480,8 +480,20 @@
         serviceset = ServiceSet(self._dbh, **kwargs)
         dom.update_serviceset(serviceset, (True, False)[not force])
 
+    def domain_transport(self, domainname, transport, force=None):
+        """Wrapper around Domain.update_transport()"""
+        if force is not None and force != 'force':
+            raise DomainError(_(u"Invalid argument: '%s'") % force,
+                              INVALID_ARGUMENT)
+        dom = self._get_domain(domainname)
+        trsp = Transport(self._dbh, transport=transport)
+        if force is None:
+            dom.update_transport(trsp)
+        else:
+            dom.update_transport(trsp, force=True)
+
     def domain_note(self, domainname, note):
-        """Wrapper around Domain.update_transport()"""
+        """Wrapper around Domain.update_note()"""
         dom = self._get_domain(domainname)
         dom.update_note(note)