##// END OF EJS Templates
py3: make sure curses.tigetstr() first argument is a str...
Pulkit Goyal -
r37682:483cafc3 default
parent child Browse files
Show More
@@ -171,12 +171,12 def _terminfosetup(ui, mode, formatted):
171 171 for key, (b, e, c) in ui._terminfoparams.copy().items():
172 172 if not b:
173 173 continue
174 if not c and not curses.tigetstr(e):
174 if not c and not curses.tigetstr(pycompat.sysstr(e)):
175 175 # Most terminals don't support dim, invis, etc, so don't be
176 176 # noisy and use ui.debug().
177 177 ui.debug("no terminfo entry for %s\n" % e)
178 178 del ui._terminfoparams[key]
179 if not curses.tigetstr('setaf') or not curses.tigetstr('setab'):
179 if not curses.tigetstr(r'setaf') or not curses.tigetstr(r'setab'):
180 180 # Only warn about missing terminfo entries if we explicitly asked for
181 181 # terminfo mode and we're in a formatted terminal.
182 182 if mode == "terminfo" and formatted:
@@ -325,11 +325,11 def _effect_str(ui, effect):
325 325 if termcode:
326 326 return termcode
327 327 else:
328 return curses.tigetstr(val)
328 return curses.tigetstr(pycompat.sysstr(val))
329 329 elif bg:
330 return curses.tparm(curses.tigetstr('setab'), val)
330 return curses.tparm(curses.tigetstr(r'setab'), val)
331 331 else:
332 return curses.tparm(curses.tigetstr('setaf'), val)
332 return curses.tparm(curses.tigetstr(r'setaf'), val)
333 333
334 334 def _mergeeffects(text, start, stop):
335 335 """Insert start sequence at every occurrence of stop sequence
General Comments 0
You need to be logged in to leave comments. Login now