Mercurial > hg
diff mercurial/dispatch.py @ 36729:389b950f5190
py3: use startswith() instead of slicing to detect leading whitespace
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 04 Mar 2018 15:24:45 -0500 |
parents | 3fdba7fb264d |
children | f0b6fbea00cf |
line wrap: on
line diff
--- a/mercurial/dispatch.py Sun Mar 04 16:06:47 2018 -0500 +++ b/mercurial/dispatch.py Sun Mar 04 15:24:45 2018 -0500 @@ -158,7 +158,7 @@ if len(inst.args) > 1: write(_("hg: parse error at %s: %s\n") % (pycompat.bytestr(inst.args[1]), inst.args[0])) - if (inst.args[0][0] == ' '): + if inst.args[0].startswith(' '): write(_("unexpected leading whitespace\n")) else: write(_("hg: parse error: %s\n") % inst.args[0])