repository/*: replace UIBase.getglobalui() with getglobalui()

The latter is much shorter and looks nicer. UIBase was a very weird
name and with this patch, we don't need to use (or see) it from higher
level code anymore.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-01-05 17:00:56 +01:00 committed by Nicolas Sebrecht
parent c6d6dc814f
commit 67089248da
2 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
from offlineimap import CustomConfig from offlineimap import CustomConfig
from offlineimap.ui import UIBase from offlineimap.ui import getglobalui
import os.path import os.path
import sys import sys
@ -164,7 +164,7 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
for copyfolder in copyfolders: for copyfolder in copyfolders:
copyfolder.makefolder(key.replace(dest.getsep(), copyfolder.getsep())) copyfolder.makefolder(key.replace(dest.getsep(), copyfolder.getsep()))
except: except:
UIBase.getglobalui().warn("ERROR Attempting to make folder " \ getglobalui().warn("ERROR Attempting to make folder " \
+ key + ":" +str(sys.exc_info()[1])) + key + ":" +str(sys.exc_info()[1]))

View File

@ -18,7 +18,7 @@
from Base import BaseRepository from Base import BaseRepository
from offlineimap import folder, imaputil from offlineimap import folder, imaputil
from offlineimap.ui import UIBase from offlineimap.ui import getglobalui
from mailbox import Maildir from mailbox import Maildir
import os import os
from stat import * from stat import *
@ -31,7 +31,7 @@ class MaildirRepository(BaseRepository):
self.root = self.getlocalroot() self.root = self.getlocalroot()
self.folders = None self.folders = None
self.ui = UIBase.getglobalui() self.ui = getglobalui()
self.debug("MaildirRepository initialized, sep is " + repr(self.getsep())) self.debug("MaildirRepository initialized, sep is " + repr(self.getsep()))
self.folder_atimes = [] self.folder_atimes = []