Fix crash when submission page contains non standard characters
This commit is contained in:
@@ -270,9 +270,13 @@ class Terminal(object):
|
|||||||
# Trying to draw outside of the screen bounds
|
# Trying to draw outside of the screen bounds
|
||||||
return
|
return
|
||||||
|
|
||||||
text = self.clean(text, n_cols)
|
try:
|
||||||
params = [] if attr is None else [attr]
|
text = self.clean(text, n_cols)
|
||||||
window.addstr(row, col, text, *params)
|
params = [] if attr is None else [attr]
|
||||||
|
window.addstr(row, col, text, *params)
|
||||||
|
except curses.error as e:
|
||||||
|
_logger.warning('add_line raised an exception')
|
||||||
|
_logger.exception(str(e))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def add_space(window):
|
def add_space(window):
|
||||||
|
|||||||
Reference in New Issue
Block a user