From 9df7f34d4c7dab72de991416fff5d678e02abdab Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Sun, 5 Feb 2012 11:49:28 +0100 Subject: [PATCH] Remove unused locked() function We do not use ui.locked() anymore to output an error message, the text comes directly from the exception. Signed-off-by: Sebastian Spaeth --- offlineimap/accounts.py | 3 ++- offlineimap/ui/UIBase.py | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/offlineimap/accounts.py b/offlineimap/accounts.py index 429dc19..ed08cad 100644 --- a/offlineimap/accounts.py +++ b/offlineimap/accounts.py @@ -199,7 +199,8 @@ class SyncableAccount(Account): pass except IOError: self._lockfd.close() - raise OfflineImapError("Could not lock account %s." % self, + raise OfflineImapError("Could not lock account %s. Is another " + "instance using this account?" % self, OfflineImapError.ERROR.REPO) def unlock(self): diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py index 06dbd01..74ef22e 100644 --- a/offlineimap/ui/UIBase.py +++ b/offlineimap/ui/UIBase.py @@ -203,9 +203,6 @@ class UIBase(object): def invaliddebug(self, debugtype): self.warn("Invalid debug type: %s" % debugtype) - def locked(s): - raise Exception, "Another OfflineIMAP is running with the same metadatadir; exiting." - def getnicename(self, object): """Return the type of a repository or Folder as string