Issue #0002175: Change type() expressions to isinstance() expressions.

Patch from Gerald Britton <gerald.britton@gmail.com>


svn: r10762
This commit is contained in:
Zsolt Foldvari
2008-05-25 19:55:47 +00:00
parent 62b6250d2f
commit 998908175f
53 changed files with 105 additions and 113 deletions

View File

@@ -397,8 +397,8 @@ class Callback(object):
for (key, fn) in self.__callback_map[signal_name]:
self._log("Calling callback with key: %s\n" % (key, ))
try:
if type(fn) == types.FunctionType or \
type(fn) == types.MethodType: # call func
if isinstance(fn, types.FunctionType) or \
isinstance(fn, types.MethodType): # call func
fn(*args)
else:
self._warn("Badly formed entry in callback map.\n")