Mercurial > public > mercurial-scm > hg-stable
comparison hgext/githelp.py @ 38176:c3960c7e66fa
py3: replace str.format(x) with `str % x` in githelp
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 23 May 2018 22:25:00 -0400 |
parents | cfa93fbbe9b4 |
children | c303d65d2e34 |
comparison
equal
deleted
inserted
replaced
38175:cfa93fbbe9b4 | 38176:c3960c7e66fa |
---|---|
92 else: | 92 else: |
93 raise error.Abort(_("unknown option %s") % ex.opt) | 93 raise error.Abort(_("unknown option %s") % ex.opt) |
94 try: | 94 try: |
95 args.remove(flag) | 95 args.remove(flag) |
96 except Exception: | 96 except Exception: |
97 msg = _("unknown option '{0}' packed with other options") | 97 msg = _("unknown option '%s' packed with other options") |
98 hint = _("please try passing the option as its own flag: -{0}") | 98 hint = _("please try passing the option as its own flag: -%s") |
99 raise error.Abort(msg.format(ex.opt), hint=hint.format(ex.opt)) | 99 raise error.Abort(msg % ex.opt, hint=hint % ex.opt) |
100 | 100 |
101 ui.warn(_("ignoring unknown option %s\n") % flag) | 101 ui.warn(_("ignoring unknown option %s\n") % flag) |
102 | 102 |
103 args = list([convert(x) for x in args]) | 103 args = list([convert(x) for x in args]) |
104 opts = dict([(k, convert(v)) if isinstance(v, str) else (k, v) | 104 opts = dict([(k, convert(v)) if isinstance(v, str) else (k, v) |