Fix wrong tests for None.
This commit is contained in:
parent
73749091ae
commit
accf6ab777
2 changed files with 3 additions and 3 deletions
|
@ -725,7 +725,7 @@ class CommandInput(HistoryInput):
|
||||||
HistoryInput.__init__(self)
|
HistoryInput.__init__(self)
|
||||||
self.on_abort = on_abort
|
self.on_abort = on_abort
|
||||||
self.on_success = on_success
|
self.on_success = on_success
|
||||||
if on_input is None:
|
if on_input is not None:
|
||||||
self.on_input = on_input
|
self.on_input = on_input
|
||||||
else:
|
else:
|
||||||
self.on_input = DEFAULT_ON_INPUT
|
self.on_input = DEFAULT_ON_INPUT
|
||||||
|
|
|
@ -374,7 +374,7 @@ class TextWin(BaseTextWin):
|
||||||
if get_theme().CHAR_TIME_RIGHT and message.str_time:
|
if get_theme().CHAR_TIME_RIGHT and message.str_time:
|
||||||
offset += 1
|
offset += 1
|
||||||
lines = poopt.cut_text(txt, self.width - offset - 1)
|
lines = poopt.cut_text(txt, self.width - offset - 1)
|
||||||
prepend = default_color if default_color is None else ''
|
prepend = default_color if default_color else ''
|
||||||
attrs = [] # type: List[str]
|
attrs = [] # type: List[str]
|
||||||
for line in lines:
|
for line in lines:
|
||||||
saved = Line(
|
saved = Line(
|
||||||
|
@ -626,7 +626,7 @@ class XMLTextWin(BaseTextWin):
|
||||||
if get_theme().CHAR_TIME_RIGHT and message.str_time:
|
if get_theme().CHAR_TIME_RIGHT and message.str_time:
|
||||||
offset += 1
|
offset += 1
|
||||||
lines = poopt.cut_text(txt, self.width - offset - 1)
|
lines = poopt.cut_text(txt, self.width - offset - 1)
|
||||||
prepend = default_color if default_color is not None else ''
|
prepend = default_color if default_color else ''
|
||||||
attrs = [] # type: List[str]
|
attrs = [] # type: List[str]
|
||||||
for line in lines:
|
for line in lines:
|
||||||
saved = Line(
|
saved = Line(
|
||||||
|
|
Loading…
Reference in a new issue