diff urwid_satext/sat_widgets.py @ 89:2141f07b5fdd

primitivus: no more direct error/warning methods for logging
author Goffi <goffi@goffi.org>
date Mon, 08 Sep 2014 15:42:25 +0200
parents c95462c21966
children f5992b2a0dbf
line wrap: on
line diff
--- a/urwid_satext/sat_widgets.py	Mon Sep 08 15:42:23 2014 +0200
+++ b/urwid_satext/sat_widgets.py	Mon Sep 08 15:42:25 2014 +0200
@@ -18,7 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import urwid
-from logging import debug, info, warning, error
+import logging as log
 import encodings
 utf8decode = lambda s: encodings.codecs.utf_8_decode(s)[0]
 
@@ -1207,7 +1207,7 @@
             if tab[0] == tab_name:
                 break
         if tab[0] != tab_name:
-            error(_("INTERNAL ERROR: Tab not found"))
+            log.error(_("INTERNAL ERROR: Tab not found"))
             assert(False)
         self.__frame.body = tab[1]
         button.set_label(('title',button.get_label()))
@@ -1342,7 +1342,7 @@
                 try:
                     options[opt] = tuple(options[opt])
                 except TypeError:
-                    warning('[%s] option is not a tuple' % opt)
+                    log.warning('[%s] option is not a tuple' % opt)
                     options[opt] = ()
         self._options = options
         self._dividechars = dividechars