[PATCH] Don't ask for username in the preauthtunnel case

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Sep 19 07:33:42 BST 2011


repos.getuesr() asks for a username if none is specified, but in the
case of a tunnel connection, we don't need one, so we need to skip the
repos.getuser() call here.

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 offlineimap/imapserver.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py
index 7c740c7..5d2d108 100644
--- a/offlineimap/imapserver.py
+++ b/offlineimap/imapserver.py
@@ -56,7 +56,7 @@ class IMAPServer:
         self.config = repos.getconfig()
         self.tunnel = repos.getpreauthtunnel()
         self.usessl = repos.getssl()
-        self.username = repos.getuser()
+        self.username = None if self.tunnel else repos.getuser()
         self.password = None
         self.passworderror = None
         self.goodpassword = None
-- 
1.7.4.1





More information about the OfflineIMAP-project mailing list