Merge branch 'master' into next
Conflicts: Changelog.draft.rst
This commit is contained in:
commit
c6259fbb86
@ -33,6 +33,7 @@ Bug Fixes
|
||||
|
||||
* Drop connection if synchronisation failed. This is needed if resuming the
|
||||
system from suspend mode gives a wrong connection.
|
||||
* Fix the offlineimap crash when invoking debug option 'thread'
|
||||
|
||||
|
||||
Pending for the next major release
|
||||
|
@ -77,8 +77,13 @@ class LocalStatusFolder(BaseFolder):
|
||||
assert(line == magicline)
|
||||
for line in file.xreadlines():
|
||||
line = line.strip()
|
||||
try:
|
||||
uid, flags = line.split(':')
|
||||
uid = long(uid)
|
||||
except ValueError, e:
|
||||
errstr = "Corrupt line '%s' in cache file '%s'" % (line, self.filename)
|
||||
self.ui.warn(errstr)
|
||||
raise ValueError(errstr)
|
||||
flags = [x for x in flags]
|
||||
self.messagelist[uid] = {'uid': uid, 'flags': flags}
|
||||
file.close()
|
||||
|
@ -220,7 +220,7 @@ class OfflineImap:
|
||||
if not ('thread' in options.debugtype.split(',') \
|
||||
and options.singlethreading):
|
||||
ui._msg("Debug mode: Forcing to singlethreaded.")
|
||||
options.singlethreaded = True
|
||||
options.singlethreading = True
|
||||
|
||||
debugtypes = options.debugtype.split(',') + ['']
|
||||
for type in debugtypes:
|
||||
@ -228,8 +228,6 @@ class OfflineImap:
|
||||
ui.add_debug(type)
|
||||
if type.lower() == 'imap':
|
||||
imaplib.Debug = 5
|
||||
if type.lower() == 'thread':
|
||||
threading._VERBOSE = 1
|
||||
|
||||
if options.runonce:
|
||||
# FIXME: maybe need a better
|
||||
|
@ -92,11 +92,14 @@ class UIBase:
|
||||
(threading.currentThread().getName(),
|
||||
s.getthreadaccount(s), account)
|
||||
s.threadaccounts[threading.currentThread()] = account
|
||||
s.debug('thread', "Register new thread '%s' (account '%s')" %\
|
||||
(threading.currentThread().getName(), account))
|
||||
|
||||
def unregisterthread(s, thr):
|
||||
"""Recognizes a thread has exited."""
|
||||
if s.threadaccounts.has_key(thr):
|
||||
del s.threadaccounts[thr]
|
||||
s.debug('thread', "Unregister thread '%s'" % thr.getName())
|
||||
|
||||
def getthreadaccount(s, thr = None):
|
||||
if not thr:
|
||||
|
Loading…
Reference in New Issue
Block a user