##// END OF EJS Templates
py3: use startswith() instead of slicing to detect leading whitespace
Yuya Nishihara -
r36747:389b950f default
parent child Browse files
Show More
@@ -158,7 +158,7 b' def _formatparse(write, inst):'
158 if len(inst.args) > 1:
158 if len(inst.args) > 1:
159 write(_("hg: parse error at %s: %s\n") %
159 write(_("hg: parse error at %s: %s\n") %
160 (pycompat.bytestr(inst.args[1]), inst.args[0]))
160 (pycompat.bytestr(inst.args[1]), inst.args[0]))
161 if (inst.args[0][0] == ' '):
161 if inst.args[0].startswith(' '):
162 write(_("unexpected leading whitespace\n"))
162 write(_("unexpected leading whitespace\n"))
163 else:
163 else:
164 write(_("hg: parse error: %s\n") % inst.args[0])
164 write(_("hg: parse error: %s\n") % inst.args[0])
General Comments 0
You need to be logged in to leave comments. Login now