Retabified
This commit is contained in:
parent
4b10e30d81
commit
8200864f25
@ -85,30 +85,30 @@ class IMAPRepository(BaseRepository):
|
|||||||
return self.imapserver.delim
|
return self.imapserver.delim
|
||||||
|
|
||||||
def gethost(self):
|
def gethost(self):
|
||||||
host = None
|
host = None
|
||||||
localeval = self.localeval
|
localeval = self.localeval
|
||||||
|
|
||||||
if self.config.has_option(self.getsection(), 'remotehosteval'):
|
if self.config.has_option(self.getsection(), 'remotehosteval'):
|
||||||
host = self.getconf('remotehosteval')
|
host = self.getconf('remotehosteval')
|
||||||
if host != None:
|
if host != None:
|
||||||
return localeval.eval(host)
|
return localeval.eval(host)
|
||||||
|
|
||||||
host = self.getconf('remotehost')
|
host = self.getconf('remotehost')
|
||||||
if host != None:
|
if host != None:
|
||||||
return host
|
return host
|
||||||
|
|
||||||
def getuser(self):
|
def getuser(self):
|
||||||
user = None
|
user = None
|
||||||
localeval = self.localeval
|
localeval = self.localeval
|
||||||
|
|
||||||
if self.config.has_option(self.getsection(), 'remoteusereval'):
|
if self.config.has_option(self.getsection(), 'remoteusereval'):
|
||||||
user = self.getconf('remoteusereval')
|
user = self.getconf('remoteusereval')
|
||||||
if user != None:
|
if user != None:
|
||||||
return localeval.eval(user)
|
return localeval.eval(user)
|
||||||
|
|
||||||
user = self.getconf('remoteuser')
|
user = self.getconf('remoteuser')
|
||||||
if user != None:
|
if user != None:
|
||||||
return user
|
return user
|
||||||
|
|
||||||
def getport(self):
|
def getport(self):
|
||||||
return self.getconfint('remoteport', None)
|
return self.getconfint('remoteport', None)
|
||||||
@ -129,13 +129,13 @@ class IMAPRepository(BaseRepository):
|
|||||||
return self.getconfboolean('expunge', 1)
|
return self.getconfboolean('expunge', 1)
|
||||||
|
|
||||||
def getpassword(self):
|
def getpassword(self):
|
||||||
passwd = None
|
passwd = None
|
||||||
localeval = self.localeval
|
localeval = self.localeval
|
||||||
|
|
||||||
if self.config.has_option(self.getsection(), 'remotepasseval'):
|
if self.config.has_option(self.getsection(), 'remotepasseval'):
|
||||||
passwd = self.getconf('remotepasseval')
|
passwd = self.getconf('remotepasseval')
|
||||||
if passwd != None:
|
if passwd != None:
|
||||||
return localeval.eval(passwd)
|
return localeval.eval(passwd)
|
||||||
|
|
||||||
password = self.getconf('remotepass', None)
|
password = self.getconf('remotepass', None)
|
||||||
if password != None:
|
if password != None:
|
||||||
@ -145,7 +145,7 @@ class IMAPRepository(BaseRepository):
|
|||||||
fd = open(os.path.expanduser(passfile))
|
fd = open(os.path.expanduser(passfile))
|
||||||
password = fd.readline().strip()
|
password = fd.readline().strip()
|
||||||
fd.close()
|
fd.close()
|
||||||
return password
|
return password
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def getfolder(self, foldername):
|
def getfolder(self, foldername):
|
||||||
|
Loading…
Reference in New Issue
Block a user