summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 0cc9262..df571e7 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -10,6 +10,7 @@ import stat
from os.path import abspath
import fnmatch
from warnings import warn
+import collections
try:
from pwd import getpwnam
@@ -500,7 +501,7 @@ def register_archive_format(name, function, extra_args=None, description=''):
"""
if extra_args is None:
extra_args = []
- if not callable(function):
+ if not isinstance(function, collections.Callable):
raise TypeError('The %s object is not callable' % function)
if not isinstance(extra_args, (tuple, list)):
raise TypeError('extra_args needs to be a sequence')