Merge branch 'dxtr-remoteporteval'

This commit is contained in:
Dmitrijs Ledkovs 2013-07-10 02:17:44 +01:00
commit a26ce6d126
2 changed files with 8 additions and 0 deletions

View File

@ -292,6 +292,7 @@ type = IMAP
# "getcredentials" that parses a file "filename" and returns the account
# details for "hostname".
# remotehosteval = getcredentials("filename", "hostname", "hostname")
# remoteporteval = getcredentials("filename", "hostname", "port")
# remoteusereval = getcredentials("filename", "hostname", "user")
# remotepasseval = getcredentials("filename", "hostname", "passwd")

View File

@ -148,6 +148,13 @@ class IMAPRepository(BaseRepository):
def getport(self):
port = None
if self.config.has_option(self.getsection(), 'remoteporteval'):
port = self.getconf('remoteporteval')
if port != None:
return self.localeval.eval(port)
return self.getconfint('remoteport', None)
def getssl(self):