Reformat offlineimap/ui/Curses.py

Add some spaces, remove lines,... now format is better (lintian).
This commit is contained in:
Rodolfo García Peñas (kix) 2020-08-29 19:55:07 +02:00
parent 1df1a39b11
commit 1b385dfafb

View File

@ -99,6 +99,7 @@ class CursesUtil:
def lockedstuff():
curses.panel.update_panels()
curses.doupdate()
self.exec_locked(lockedstuff)
def isactive(self):
@ -142,6 +143,7 @@ class CursesAccountFrame:
self.window.addstr(0, 0, accstr)
except curses.error as e: # Occurs when the terminal is very small
pass
self.ui.exec_locked(addstr);
self.location = len(accstr)
@ -191,6 +193,7 @@ class CursesAccountFrame:
self.account.config.set('Account %s' % self.account.name,
'skipsleep', '1')
class CursesThreadFrame:
"""curses_color: current color pair for logging."""
@ -222,6 +225,7 @@ class CursesThreadFrame:
except curses.error: # Occurs when the terminal is very small
pass
self.window.refresh()
# lock the curses IO while fudging stuff
self.ui.exec_locked(locked_display)
@ -330,6 +334,7 @@ class CursesLogHandler(logging.StreamHandler):
self.ui.unlock()
self.ui.tframe_lock.release()
class Blinkenlights(UIBase, CursesUtil):
"""Curses-cased fancy UI.
@ -476,7 +481,7 @@ class Blinkenlights(UIBase, CursesUtil):
self.gettf().setcolor('white')
super(Blinkenlights, self).callhook(*args)
############ Generic logging functions #############################
# Generic logging functions #
def warn(self, msg, minor=0):
self.gettf().setcolor('red', curses.A_BOLD)
super(Blinkenlights, self).warn(msg)
@ -670,4 +675,3 @@ class Blinkenlights(UIBase, CursesUtil):
def threadException(self, thread):
# self._log_con_handler.stop()
UIBase.threadException(self, thread)