From 02f750637496bba1a46136e1b794e5e410c91072 Mon Sep 17 00:00:00 2001 From: benoitc Date: Thu, 31 Dec 2015 15:32:08 +0100 Subject: [PATCH] rename util.is_fileobject to util.has_fileno be more descriptive --- gunicorn/http/wsgi.py | 2 +- gunicorn/util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 00b8f74fe8..6ca3b4fb7b 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -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: diff --git a/gunicorn/util.py b/gunicorn/util.py index a8875d90e5..896a22141a 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -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