summaryrefslogtreecommitdiffstats
path: root/Lib/imputil.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-10-09 22:05:45 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-10-09 22:05:45 (GMT)
commitde0559998fef231efc9ecbdef5b3a195d4eaa28d (patch)
tree235b05866ae52f80d81f2953c663d74f1de6dae1 /Lib/imputil.py
parent0c8bee639368324b750176ee171cadd33847f18e (diff)
downloadcpython-de0559998fef231efc9ecbdef5b3a195d4eaa28d.zip
cpython-de0559998fef231efc9ecbdef5b3a195d4eaa28d.tar.gz
cpython-de0559998fef231efc9ecbdef5b3a195d4eaa28d.tar.bz2
replace callable()
Diffstat (limited to 'Lib/imputil.py')
-rw-r--r--Lib/imputil.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/imputil.py b/Lib/imputil.py
index 8b37ef4..a907287 100644
--- a/Lib/imputil.py
+++ b/Lib/imputil.py
@@ -51,7 +51,7 @@ class ImportManager:
self.namespace['__import__'] = self.previous_importer
def add_suffix(self, suffix, importFunc):
- assert callable(importFunc)
+ assert hasattr(importFunc, '__call__')
self.fs_imp.add_suffix(suffix, importFunc)
######################################################################
@@ -539,7 +539,7 @@ class _FilesystemImporter(Importer):
self.suffixes = [ ]
def add_suffix(self, suffix, importFunc):
- assert callable(importFunc)
+ assert hasattr(importFunc, '__call__')
self.suffixes.append((suffix, importFunc))
def import_from_dir(self, dir, fqname):