py3: replace str.format(x) with `str % x` in githelp
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 23 May 2018 22:25:00 -0400
changeset 38143 c3960c7e66fa
parent 38142 cfa93fbbe9b4
child 38144 bd7a3fa71a72
py3: replace str.format(x) with `str % x` in githelp
hgext/githelp.py
--- a/hgext/githelp.py	Wed May 23 22:17:04 2018 -0400
+++ b/hgext/githelp.py	Wed May 23 22:25:00 2018 -0400
@@ -94,9 +94,9 @@
             try:
                 args.remove(flag)
             except Exception:
-                msg = _("unknown option '{0}' packed with other options")
-                hint = _("please try passing the option as its own flag: -{0}")
-                raise error.Abort(msg.format(ex.opt), hint=hint.format(ex.opt))
+                msg = _("unknown option '%s' packed with other options")
+                hint = _("please try passing the option as its own flag: -%s")
+                raise error.Abort(msg % ex.opt, hint=hint % ex.opt)
 
             ui.warn(_("ignoring unknown option %s\n") % flag)