rename util.is_fileobject to util.has_fileno

be more descriptive
This commit is contained in:
benoitc 2015-12-31 15:32:08 +01:00
parent d55ef38c8a
commit 5bc13be79e
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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