VMM/Account: Account.get_info() use the domain's transport, if tid matches. v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Thu, 15 Apr 2010 03:42:04 +0000
branchv0.6.x
changeset 246 481280686789
parent 245 f9a6b6701cf9
child 248 da241eacad4d
VMM/Account: Account.get_info() use the domain's transport, if tid matches.
VirtualMailManager/Account.py
--- a/VirtualMailManager/Account.py	Thu Apr 15 03:05:01 2010 +0000
+++ b/VirtualMailManager/Account.py	Thu Apr 15 03:42:04 2010 +0000
@@ -310,8 +310,11 @@
             info['address'] = self._addr
             info['home'] = '%s/%s' % (self._domain.directory, info['uid'])
             info['mail_location'] = MailLocation(mid=info['mid']).mail_location
-            info['transport'] = Transport(self._dbh,
-                                          tid=info['transport']).transport
+            if info['transport'] == self._domain.transport.tid:
+                info['transport'] = self._domain.transport.transport
+            else:
+                info['transport'] = Transport(self._dbh,
+                                              tid=info['transport']).transport
             del info['mid']
             return info
         # nearly impossibleā€½