From a51469326e84ed977ecc4e57fd3d46cdc21aa08f Mon Sep 17 00:00:00 2001 From: Zhongyue Luo Date: Fri, 10 May 2013 23:15:08 +0800 Subject: Removes len() on empty sequence evaluation PEP8 suggestes, "For sequences, use the fact that empty sequences are false." Change-Id: I4c600a7a6230a55328ee46f7c59f340f37abc18f --- openstack/common/wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstack/common/wsgi.py') diff --git a/openstack/common/wsgi.py b/openstack/common/wsgi.py index 9e92ffe..d184963 100644 --- a/openstack/common/wsgi.py +++ b/openstack/common/wsgi.py @@ -659,7 +659,7 @@ class RequestDeserializer(object): return self.headers_deserializer.deserialize(request, action) def deserialize_body(self, request, action): - if not len(request.body) > 0: + if not request.body: LOG.debug(_("Empty body provided in request")) return {} -- cgit