Remove a use of callable() in fileinput to silence a -3 warning.

This commit is contained in:
Brett Cannon 2008-08-03 23:52:32 +00:00
parent c66b03a4c1
commit 36bed8a25f
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ class FileInput:
self._mode = mode self._mode = mode
if inplace and openhook: if inplace and openhook:
raise ValueError("FileInput cannot use an opening hook in inplace mode") 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") raise ValueError("FileInput openhook must be callable")
self._openhook = openhook self._openhook = openhook