diff options
| author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-07 12:14:25 (GMT) | 
|---|---|---|
| committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-07 12:14:25 (GMT) | 
| commit | 1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07 (patch) | |
| tree | 42dc10540da9b1aff1d4e6cef51e4c11ce4f5b47 /Lib/shutil.py | |
| parent | 2a4ab816332a67150fcc8ece255fb1ee8e66af83 (diff) | |
| download | cpython-1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07.zip cpython-1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07.tar.gz cpython-1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07.tar.bz2  | |
Fix some py3k warnings in the standard library.
Diffstat (limited to 'Lib/shutil.py')
| -rw-r--r-- | Lib/shutil.py | 3 | 
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')  | 
