Skip to content

Commit

Permalink
rename util.is_fileobject to util.has_fileno
Browse files Browse the repository at this point in the history
be more descriptive
  • Loading branch information
benoitc committed Dec 31, 2015
1 parent fc54479 commit 02f7506
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gunicorn/http/wsgi.py
Expand Up @@ -353,7 +353,7 @@ def sendfile(self, respiter):
if self.cfg.is_ssl or not self.can_sendfile():
return False

if not util.is_fileobject(respiter.filelike):
if not util.has_fileno(respiter.filelike):
return False

try:
Expand Down
2 changes: 1 addition & 1 deletion gunicorn/util.py
Expand Up @@ -510,7 +510,7 @@ def to_bytestring(value, encoding="utf8"):

return value.encode(encoding)

def is_fileobject(obj):
def has_fileno(obj):
if not hasattr(obj, "fileno"):
return False

Expand Down

0 comments on commit 02f7506

Please sign in to comment.