Don't ask for username in the preauthtunnel case

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@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2011-09-19 08:27:18 +02:00
parent 0d3303ec12
commit 82e47896cf

View File

@ -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