color: use pythons isinstance method instead of reprogramming it
authorSimon Heimberg <simohe@besonet.ch>
Wed, 05 Jun 2013 22:06:16 +0200
changeset 19298 6cd8403e070f
parent 19297 8ddc3cd962ba
child 19299 cdc612db2ffb
color: use pythons isinstance method instead of reprogramming it
hgext/color.py
--- a/hgext/color.py	Wed Jun 05 22:06:02 2013 +0200
+++ b/hgext/color.py	Wed 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):