Merge branch 'ezy/better-trace-information' into next
This commit is contained in:
commit
9260b3f5a1
@ -24,6 +24,7 @@ from threading import Event, Lock
|
||||
import os
|
||||
from Queue import Queue, Empty
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
class SigListener(Queue):
|
||||
def __init__(self):
|
||||
@ -191,7 +192,7 @@ class AccountSynchronizationMixin:
|
||||
raise
|
||||
except:
|
||||
self.ui.warn("Error occured attempting to sync account " + self.name \
|
||||
+ ": " + str(sys.exc_info()[1]))
|
||||
+ ": " + traceback.format_exc())
|
||||
finally:
|
||||
self.ui.acctdone(self.name)
|
||||
|
||||
@ -207,7 +208,7 @@ class AccountSynchronizationMixin:
|
||||
raise
|
||||
except:
|
||||
self.ui.warn("Error occured attempting to sync account " + self.name \
|
||||
+ ": " + str(sys.exc_info()[1]))
|
||||
+ ": " + traceback.format_exc())
|
||||
finally:
|
||||
looping = self.sleeper(siglistener) != 2
|
||||
self.ui.acctdone(self.name)
|
||||
|
@ -22,6 +22,7 @@ from offlineimap.ui import getglobalui
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
class BaseFolder:
|
||||
def __init__(self):
|
||||
@ -292,8 +293,8 @@ class BaseFolder:
|
||||
except (KeyboardInterrupt):
|
||||
raise
|
||||
except:
|
||||
self.ui.warn("ERROR attempting to copy message " + str(uid) \
|
||||
+ " for account " + self.getaccountname() + ":" + str(sys.exc_info()[1]))
|
||||
UIBase.getglobalui().warn("ERROR attempting to copy message " + str(uid) \
|
||||
+ " for account " + self.getaccountname() + ":" + traceback.format_exc())
|
||||
|
||||
|
||||
def syncmessagesto_copy(self, dest, applyto):
|
||||
@ -399,8 +400,8 @@ class BaseFolder:
|
||||
except (KeyboardInterrupt):
|
||||
raise
|
||||
except:
|
||||
self.ui.warn("ERROR attempting to handle negative uids " \
|
||||
+ "for account " + self.getaccountname() + ":" + str(sys.exc_info()[1]))
|
||||
UIBase.getglobalui().warn("ERROR attempting to handle negative uids " \
|
||||
+ "for account " + self.getaccountname() + ":" + traceback.format_exc())
|
||||
|
||||
#all threads launched here are in try / except clauses when they copy anyway...
|
||||
self.syncmessagesto_copy(dest, applyto)
|
||||
@ -410,8 +411,8 @@ class BaseFolder:
|
||||
except (KeyboardInterrupt):
|
||||
raise
|
||||
except:
|
||||
self.ui.warn("ERROR attempting to delete messages " \
|
||||
+ "for account " + self.getaccountname() + ":" + str(sys.exc_info()[1]))
|
||||
UIBase.getglobalui().warn("ERROR attempting to delete messages " \
|
||||
+ "for account " + self.getaccountname() + ":" + traceback.format_exc())
|
||||
|
||||
# Now, the message lists should be identical wrt the uids present.
|
||||
# (except for potential negative uids that couldn't be placed
|
||||
@ -422,7 +423,7 @@ class BaseFolder:
|
||||
except (KeyboardInterrupt):
|
||||
raise
|
||||
except:
|
||||
self.ui.warn("ERROR attempting to sync flags " \
|
||||
+ "for account " + self.getaccountname() + ":" + str(sys.exc_info()[1]))
|
||||
UIBase.getglobalui().warn("ERROR attempting to sync flags " \
|
||||
+ "for account " + self.getaccountname() + ":" + traceback.format_exc())
|
||||
|
||||
|
||||
|
@ -20,6 +20,7 @@ from offlineimap import CustomConfig
|
||||
from offlineimap.ui import getglobalui
|
||||
import os.path
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
def LoadRepository(name, account, reqtype):
|
||||
from offlineimap.repository.Gmail import GmailRepository
|
||||
@ -166,8 +167,8 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
||||
except (KeyboardInterrupt):
|
||||
raise
|
||||
except:
|
||||
getglobalui().warn("ERROR Attempting to make folder " \
|
||||
+ key + ":" +str(sys.exc_info()[1]))
|
||||
UIBase.getglobalui().warn("ERROR Attempting to make folder " \
|
||||
+ key + ":" +traceback.format_exc())
|
||||
|
||||
#
|
||||
# Find deleted folders.
|
||||
|
Loading…
Reference in New Issue
Block a user