##// 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 b' def _terminfosetup(ui, mode, formatted):'
171 for key, (b, e, c) in ui._terminfoparams.copy().items():
171 for key, (b, e, c) in ui._terminfoparams.copy().items():
172 if not b:
172 if not b:
173 continue
173 continue
174 if not c and not curses.tigetstr(e):
174 if not c and not curses.tigetstr(pycompat.sysstr(e)):
175 # Most terminals don't support dim, invis, etc, so don't be
175 # Most terminals don't support dim, invis, etc, so don't be
176 # noisy and use ui.debug().
176 # noisy and use ui.debug().
177 ui.debug("no terminfo entry for %s\n" % e)
177 ui.debug("no terminfo entry for %s\n" % e)
178 del ui._terminfoparams[key]
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 # Only warn about missing terminfo entries if we explicitly asked for
180 # Only warn about missing terminfo entries if we explicitly asked for
181 # terminfo mode and we're in a formatted terminal.
181 # terminfo mode and we're in a formatted terminal.
182 if mode == "terminfo" and formatted:
182 if mode == "terminfo" and formatted:
@@ -325,11 +325,11 b' def _effect_str(ui, effect):'
325 if termcode:
325 if termcode:
326 return termcode
326 return termcode
327 else:
327 else:
328 return curses.tigetstr(val)
328 return curses.tigetstr(pycompat.sysstr(val))
329 elif bg:
329 elif bg:
330 return curses.tparm(curses.tigetstr('setab'), val)
330 return curses.tparm(curses.tigetstr(r'setab'), val)
331 else:
331 else:
332 return curses.tparm(curses.tigetstr('setaf'), val)
332 return curses.tparm(curses.tigetstr(r'setaf'), val)
333
333
334 def _mergeeffects(text, start, stop):
334 def _mergeeffects(text, start, stop):
335 """Insert start sequence at every occurrence of stop sequence
335 """Insert start sequence at every occurrence of stop sequence
General Comments 0
You need to be logged in to leave comments. Login now