mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
rename util.is_fileobject to util.has_fileno
be more descriptive
This commit is contained in:
parent
d55ef38c8a
commit
5bc13be79e
@ -353,7 +353,7 @@ class Response(object):
|
|||||||
if self.cfg.is_ssl or not self.can_sendfile():
|
if self.cfg.is_ssl or not self.can_sendfile():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not util.is_fileobject(respiter.filelike):
|
if not util.has_fileno(respiter.filelike):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -510,7 +510,7 @@ def to_bytestring(value, encoding="utf8"):
|
|||||||
|
|
||||||
return value.encode(encoding)
|
return value.encode(encoding)
|
||||||
|
|
||||||
def is_fileobject(obj):
|
def has_fileno(obj):
|
||||||
if not hasattr(obj, "fileno"):
|
if not hasattr(obj, "fileno"):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user