Merge branch 'holomorph-remoteuser' into next

This commit is contained in:
Nicolas Sebrecht 2015-03-10 23:06:17 +01:00
commit 6d72fd74af

View File

@ -154,6 +154,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
@ -309,7 +310,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
@ -320,7 +321,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!