From cdccfd83b1f5e69925fa4b404d03170bd8785e9e Mon Sep 17 00:00:00 2001 From: John Goerzen Date: Wed, 10 Oct 2007 00:12:22 +0100 Subject: [PATCH] Fixed locked() for noninteractive UIs From: "Mark A. Hershberger" https://bugs.launchpad.net/ubuntu/+source/offlineimap/+bug/96710 the locked() method isn't implemented for non-interactive UIs, so exceptions are thrown on cron jobs. Ubuntu's new apport catches these and ? well, you get the idea. patch provided. --- offlineimap/ui/Noninteractive.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/offlineimap/ui/Noninteractive.py b/offlineimap/ui/Noninteractive.py index 18b18a7..c86a903 100644 --- a/offlineimap/ui/Noninteractive.py +++ b/offlineimap/ui/Noninteractive.py @@ -43,6 +43,9 @@ class Basic(UIBase): time.sleep(sleepsecs) return 0 + def locked(s): + s.warn("Another OfflineIMAP is running with the same metadatadir; exiting.") + class Quiet(Basic): def __init__(s, config, verbose = -1): Basic.__init__(s, config, verbose)