[PATCH 3/5] repository/*: replace UIBase.getglobalui() with getglobalui()

Sebastian Spaeth Sebastian at SSpaeth.de
Wed Jan 5 16:00:56 GMT 2011


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 at SSpaeth.de>
---
 offlineimap/repository/Base.py    |    4 ++--
 offlineimap/repository/Maildir.py |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/offlineimap/repository/Base.py b/offlineimap/repository/Base.py
index a9d98f1..0f4dd76 100644
--- a/offlineimap/repository/Base.py
+++ b/offlineimap/repository/Base.py
@@ -17,7 +17,7 @@
 #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
 from offlineimap import CustomConfig
-from offlineimap.ui import UIBase
+from offlineimap.ui import getglobalui
 import os.path
 import sys
 
@@ -164,7 +164,7 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
                     for copyfolder in copyfolders:
                         copyfolder.makefolder(key.replace(dest.getsep(), copyfolder.getsep()))
                 except:
-                    UIBase.getglobalui().warn("ERROR Attempting to make folder " \
+                    getglobalui().warn("ERROR Attempting to make folder " \
                         + key + ":"  +str(sys.exc_info()[1]))
                 
 
diff --git a/offlineimap/repository/Maildir.py b/offlineimap/repository/Maildir.py
index 53edd63..648440a 100644
--- a/offlineimap/repository/Maildir.py
+++ b/offlineimap/repository/Maildir.py
@@ -18,7 +18,7 @@
 
 from Base import BaseRepository
 from offlineimap import folder, imaputil
-from offlineimap.ui import UIBase
+from offlineimap.ui import getglobalui
 from mailbox import Maildir
 import os
 from stat import *
@@ -31,7 +31,7 @@ class MaildirRepository(BaseRepository):
 
         self.root = self.getlocalroot()
         self.folders = None
-        self.ui = UIBase.getglobalui()
+        self.ui = getglobalui()
         self.debug("MaildirRepository initialized, sep is " + repr(self.getsep()))
 	self.folder_atimes = []
 
-- 
1.7.1





More information about the OfflineIMAP-project mailing list