/offlineimap/head: changeset 297
Changed to a more account-centric behavior. The refresh time is now a per-account variable. Implemented new account classes. User interfaces must now be updated to take advantage of this.
This commit is contained in:
@@ -20,7 +20,7 @@ import sys, time
|
||||
from UIBase import UIBase
|
||||
|
||||
class Basic(UIBase):
|
||||
def getpass(s, accountname, config):
|
||||
def getpass(s, accountname, config, errmsg = None):
|
||||
raise NotImplementedError, "Prompting for a password is not supported in noninteractive mode."
|
||||
|
||||
def _msg(s, msg):
|
||||
|
@@ -140,6 +140,10 @@ class UIBase:
|
||||
if s.verbose >= 0:
|
||||
s._msg("***** Processing account %s" % accountname)
|
||||
|
||||
def acctdone(s, accountname):
|
||||
if s.verbose >= 0:
|
||||
s._msg("***** Finished processing account " + accountname)
|
||||
|
||||
def syncfolders(s, srcrepos, destrepos):
|
||||
if s.verbose >= 0:
|
||||
s._msg("Copying folder structure from %s to %s" % \
|
||||
|
@@ -19,7 +19,7 @@
|
||||
import offlineimap.ui
|
||||
import sys
|
||||
|
||||
def findUI(config, localeval, chosenUI=None):
|
||||
def findUI(config, chosenUI=None):
|
||||
uistrlist = ['Tk.Blinkenlights', 'Tk.VerboseUI', 'TTY.TTYUI',
|
||||
'Noninteractive.Basic', 'Noninteractive.Quiet']
|
||||
namespace={}
|
||||
@@ -34,7 +34,7 @@ def findUI(config, localeval, chosenUI=None):
|
||||
uistrlist = config.get("general", "ui").replace(" ", "").split(",")
|
||||
|
||||
for uistr in uistrlist:
|
||||
uimod = getUImod(uistr, localeval, namespace)
|
||||
uimod = getUImod(uistr, config.getlocaleval(), namespace)
|
||||
if uimod:
|
||||
uiinstance = uimod(config)
|
||||
if uiinstance.isusable():
|
||||
|
Reference in New Issue
Block a user