Commit 5f811f84 authored by Denis Bilenko's avatar Denis Bilenko

select: in case of TypeError, use the same message that standard select uses.

However, keep printing the repr of the offending object
parent efccca45
......@@ -15,7 +15,7 @@ def get_fileno(obj):
fileno_f = obj.fileno
except AttributeError:
if not isinstance(obj, int):
raise TypeError("Must be int or have fileno() method: %r" % (obj, ))
raise TypeError('argument must be an int, or have a fileno() method: %r' % (obj, ))
return obj
else:
return fileno_f()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment