mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Merge pull request #806 from benoitc/805-bug-is-fileobj
Fix check for file-like objects
This commit is contained in:
commit
7b7f3e6c0b
@ -515,7 +515,7 @@ def is_fileobject(obj):
|
||||
# check BytesIO case and maybe others
|
||||
try:
|
||||
obj.fileno()
|
||||
except io.UnsupportedOperation:
|
||||
except (IOError, io.UnsupportedOperation):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user