From patchwork Wed Jun 5 21:19:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2, of, 2] color: use pythons isinstance method instead of reprogramming it From: Simon Heimberg X-Patchwork-Id: 1706 Message-Id: <44eb3e9c5f565c9e54eb.1370467150@lapsi.heimberg.home> To: Mercurial-devel Date: Wed, 05 Jun 2013 23:19:10 +0200 # HG changeset patch # User Simon Heimberg # Date 1370462776 -7200 # Node ID 44eb3e9c5f565c9e54eb4e260f00b9bdfef83a86 # Parent c6aff923ecc418577244e7c3f1e73b6ba8804154 color: use pythons isinstance method instead of reprogramming it diff -r c6aff923ecc4 -r 44eb3e9c5f56 hgext/color.py --- a/hgext/color.py Mit Jun 05 22:06:02 2013 +0200 +++ b/hgext/color.py Mit Jun 05 22:06:16 2013 +0200 @@ -400,7 +400,7 @@ def uisetup(ui): if ui.plain(): return - if not issubclass(ui.__class__, colorui): + if not isinstance(ui, colorui): colorui.__bases__ = (ui.__class__,) ui.__class__ = colorui def colorcmd(orig, ui_, opts, cmd, cmdfunc):