[PATCH 2 of 2] color: use pythons isinstance method instead of reprogramming it
Simon Heimberg
simohe at besonet.ch
Wed Jun 5 16:19:10 CDT 2013
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# 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):
More information about the Mercurial-devel
mailing list