do not error if remoteuser
is not configured
Signed-off-by: Mark Oteiza <mvoteiza@udel.edu> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
1746676af8
commit
a629b4e0e7
@ -156,6 +156,7 @@ class IMAPRepository(BaseRepository):
|
||||
if user != None:
|
||||
return localeval.eval(user)
|
||||
|
||||
if self.config.has_option(self.getsection(), 'remoteuser'):
|
||||
user = self.getconf('remoteuser')
|
||||
if user != None:
|
||||
return user
|
||||
@ -284,7 +285,7 @@ class IMAPRepository(BaseRepository):
|
||||
raise
|
||||
else:
|
||||
if netrcentry:
|
||||
user = self.getconf('remoteuser')
|
||||
user = self.getuser()
|
||||
if user == None or user == netrcentry[0]:
|
||||
return netrcentry[2]
|
||||
# 5. read password from /etc/netrc
|
||||
@ -295,7 +296,7 @@ class IMAPRepository(BaseRepository):
|
||||
raise
|
||||
else:
|
||||
if netrcentry:
|
||||
user = self.getconf('remoteuser')
|
||||
user = self.getuser()
|
||||
if user == None or user == netrcentry[0]:
|
||||
return netrcentry[2]
|
||||
# no strategy yielded a password!
|
||||
|
Loading…
Reference in New Issue
Block a user