Bug#613483: This patch fixes it and has been proposed upstream

2011-03-08 Thread Luca Capello
reopen 613483 
notfixed 613483 6.3.2~rc3-2
found 613483 6.3.2~rc3-2
tags 613483 + upstream
tags 613483 + patch
tags 613483 + fixed-upstream
thanks

Hi there!

On Thu, 17 Feb 2011 12:31:02 +0100, Sebastian Spaeth wrote:
 Attached patch fixes the issue, and has been proposed upstream, so it
 will hopefully be fixed in 6.3.2.

 Sebastian

From 7828a350eb929dbb26fdef17bc33491ae48d88d6 Mon Sep 17 00:00:00 2001
 From: Sebastian Spaeth1 sebast...@sspaeth.de
 Date: Thu, 17 Feb 2011 12:25:11 +0100
 Subject: [PATCH] Use self.ui rather than UIBase.getglobalui()

 We have vonverted all places in folder/* to have self.ui available,
 rather than having to use UIBase.getglobalui() all the
 time. Unfortunately, we did not convert the users in folder/Base.py.

It seems that there are still other errors:
=
luca.capello@gismo:~$ offlineimap
[...]
 Establishing connection to tunnel:MAIL=maildir:$HOME/Maildir 
/usr/lib/dovecot/imap.
 WARNING: Error occured attempting to sync account PcaHome: Traceback (most 
recent call last):
  File /usr/lib/pymodules/python2.6/offlineimap/accounts.py, line 206, in 
syncrunner
self.sync(siglistener)
  File /usr/lib/pymodules/python2.6/offlineimap/accounts.py, line 245, in sync
remoterepos.syncfoldersto(localrepos, [statusrepos])
  File /usr/lib/pymodules/python2.6/offlineimap/repository/Base.py, line 170, 
in syncfoldersto
UIBase.getglobalui().warn(ERROR Attempting to make folder  \
NameError: global name 'UIBase' is not defined
=

This has been fixed upstream, please import the following patch as well:

  
https://github.com/nicolas33/offlineimap/commit/d05162675c62277f3197ccc515bcf965be9308fc

Thx, bye,
Gismo / Luca


pgp0CO6X6Gzbl.pgp
Description: PGP signature


Bug#613483: This patch fixes it and has been proposed upstream

2011-02-17 Thread Sebastian Spaeth
Attached patch fixes the issue, and has been proposed upstream, so it
will hopefully be fixed in 6.3.2.

Sebastian
From 7828a350eb929dbb26fdef17bc33491ae48d88d6 Mon Sep 17 00:00:00 2001
From: Sebastian Spaeth1 sebast...@sspaeth.de
Date: Thu, 17 Feb 2011 12:25:11 +0100
Subject: [PATCH] Use self.ui rather than UIBase.getglobalui()

We have vonverted all places in folder/* to have self.ui available,
rather than having to use UIBase.getglobalui() all the
time. Unfortunately, we did not convert the users in folder/Base.py.
This patch does it belatedly. This fixes
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613483

Signed-off-by: Sebastian Spaeth1 sebast...@sspaeth.de
---
Please apply to master, this one unbreaks another crash that results from converting most but not all users of UIBase.getglobalui() to self.ui.

It should go in before a release.

 offlineimap/folder/Base.py |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/offlineimap/folder/Base.py b/offlineimap/folder/Base.py
index 0524ec9..8e6a6b3 100644
--- a/offlineimap/folder/Base.py
+++ b/offlineimap/folder/Base.py
@@ -293,7 +293,7 @@ class BaseFolder:
 except (KeyboardInterrupt):
 raise
 except:
-UIBase.getglobalui().warn(ERROR attempting to copy message  + str(uid) \
+self.ui.warn(ERROR attempting to copy message  + str(uid) \
  +  for account  + self.getaccountname() + : + traceback.format_exc())
 
 
@@ -400,7 +400,7 @@ class BaseFolder:
 except (KeyboardInterrupt):
 raise
 except:
-UIBase.getglobalui().warn(ERROR attempting to handle negative uids  \
+self.ui.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...
@@ -411,7 +411,7 @@ class BaseFolder:
 except (KeyboardInterrupt):
 raise
 except:
-UIBase.getglobalui().warn(ERROR attempting to delete messages  \
+self.ui.warn(ERROR attempting to delete messages  \
 + for account  + self.getaccountname() + : + traceback.format_exc())
 
 # Now, the message lists should be identical wrt the uids present.
@@ -423,7 +423,7 @@ class BaseFolder:
 except (KeyboardInterrupt):
 raise
 except:
-UIBase.getglobalui().warn(ERROR attempting to sync flags  \
+self.ui.warn(ERROR attempting to sync flags  \
 + for account  + self.getaccountname() + : + traceback.format_exc())
 
 
-- 
1.7.1