/head: changeset 124

Fixed remotepassfile
This commit is contained in:
jgoerzen 2002-07-16 23:36:33 +01:00
parent d3f86beb9f
commit 158f316267
3 changed files with 14 additions and 11 deletions

View File

@ -1,3 +1,12 @@
offlineimap (3.0.2) unstable; urgency=low
* Fixed mailbox name recorder to use localfolder.getvisiblename() rather
than remotefolder.getvisiblename()
* Fixed remotepassfile option. Closes: #153119. Used 1-line patch from
Tommi Virtanen.
-- John Goerzen <jgoerzen@complete.org> Mon, 15 Jul 2002 19:43:36 -0500
offlineimap (3.0.1) unstable; urgency=low offlineimap (3.0.1) unstable; urgency=low
* Detabified the source. * Detabified the source.

View File

@ -90,7 +90,7 @@ for account in accounts:
elif config.has_option(account, "remotepass"): elif config.has_option(account, "remotepass"):
passwords[account] = config.get(account, "remotepass") passwords[account] = config.get(account, "remotepass")
elif config.has_option(account, "remotepassfile"): elif config.has_option(account, "remotepassfile"):
passfile = os.path.expanduser(config.get(account, "remotepassfile")) passfile = open(os.path.expanduser(config.get(account, "remotepassfile")))
passwords[account] = passfile.readline().strip() passwords[account] = passfile.readline().strip()
passfile.close() passfile.close()
else: else:
@ -103,15 +103,8 @@ for account in accounts:
config.getint(account, "maxconnections")) config.getint(account, "maxconnections"))
mailboxes = [] mailboxes = []
mailboxlock = Lock()
servers = {} servers = {}
def addmailbox(accountname, remotefolder):
mailboxlock.acquire()
mailboxes.append({'accountname' : accountname,
'foldername': remotefolder.getvisiblename()})
mailboxlock.release()
def syncaccount(accountname, *args): def syncaccount(accountname, *args):
# We don't need an account lock because syncitall() goes through # We don't need an account lock because syncitall() goes through
# each account once, then waits for all to finish. # each account once, then waits for all to finish.
@ -160,12 +153,13 @@ def syncaccount(accountname, *args):
def syncfolder(accountname, remoterepos, remotefolder, localrepos, def syncfolder(accountname, remoterepos, remotefolder, localrepos,
statusrepos): statusrepos):
mailboxes.append({'accountname': accountname,
'foldername': remotefolder.getvisiblename()})
# Load local folder. # Load local folder.
localfolder = localrepos.\ localfolder = localrepos.\
getfolder(remotefolder.getvisiblename().\ getfolder(remotefolder.getvisiblename().\
replace(remoterepos.getsep(), localrepos.getsep())) replace(remoterepos.getsep(), localrepos.getsep()))
# Write the mailboxes
mailboxes.append({'accountname': accountname,
'foldername': localfolder.getvisiblename()})
# Load local folder # Load local folder
ui.syncingfolder(remoterepos, remotefolder, localrepos, localfolder) ui.syncingfolder(remoterepos, remotefolder, localrepos, localfolder)
ui.loadmessagelist(localrepos, localfolder) ui.loadmessagelist(localrepos, localfolder)

View File

@ -1,5 +1,5 @@
productname = 'OfflineIMAP' productname = 'OfflineIMAP'
versionstr = "3.0.1" versionstr = "3.0.2"
versionlist = versionstr.split(".") versionlist = versionstr.split(".")
major = versionlist[0] major = versionlist[0]