mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merge 3.2
This commit is contained in:
commit
aabbda5354
27 changed files with 51 additions and 54 deletions
|
@ -120,12 +120,11 @@ def search_function(encoding):
|
|||
if not 4 <= len(entry) <= 7:
|
||||
raise CodecRegistryError('module "%s" (%s) failed to register'
|
||||
% (mod.__name__, mod.__file__))
|
||||
if not hasattr(entry[0], '__call__') or \
|
||||
not hasattr(entry[1], '__call__') or \
|
||||
(entry[2] is not None and not hasattr(entry[2], '__call__')) or \
|
||||
(entry[3] is not None and not hasattr(entry[3], '__call__')) or \
|
||||
(len(entry) > 4 and entry[4] is not None and not hasattr(entry[4], '__call__')) or \
|
||||
(len(entry) > 5 and entry[5] is not None and not hasattr(entry[5], '__call__')):
|
||||
if not callable(entry[0]) or not callable(entry[1]) or \
|
||||
(entry[2] is not None and not callable(entry[2])) or \
|
||||
(entry[3] is not None and not callable(entry[3])) or \
|
||||
(len(entry) > 4 and entry[4] is not None and not callable(entry[4])) or \
|
||||
(len(entry) > 5 and entry[5] is not None and not callable(entry[5])):
|
||||
raise CodecRegistryError('incompatible codecs in module "%s" (%s)'
|
||||
% (mod.__name__, mod.__file__))
|
||||
if len(entry)<7 or entry[6] is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue