Remove a use of callable() in fileinput to silence a -3 warning.
This commit is contained in:
parent
c66b03a4c1
commit
36bed8a25f
|
@ -226,7 +226,7 @@ class FileInput:
|
|||
self._mode = mode
|
||||
if inplace and openhook:
|
||||
raise ValueError("FileInput cannot use an opening hook in inplace mode")
|
||||
elif openhook and not callable(openhook):
|
||||
elif openhook and not hasattr(openhook, '__call__'):
|
||||
raise ValueError("FileInput openhook must be callable")
|
||||
self._openhook = openhook
|
||||
|
||||
|
|
Loading…
Reference in New Issue