From 25eca422db9393073938e87b01499ca4ce3d8f68 Mon Sep 17 00:00:00 2001 From: Krzysztof Urbaniak Date: Thu, 28 Jan 2016 10:49:43 +0100 Subject: [PATCH] fix formatting --- gunicorn/glogging.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gunicorn/glogging.py b/gunicorn/glogging.py index 545dea799..4212f5045 100644 --- a/gunicorn/glogging.py +++ b/gunicorn/glogging.py @@ -237,10 +237,9 @@ def log(self, lvl, msg, *args, **kwargs): def atoms(self, resp, req, environ, request_time): """ Gets atoms for log formating. """ - if type(resp.status) is int: - status = resp.status - else: - status = resp.status.split(None, 1)[0] + status = resp.status + if isinstance(status, str): + status = status.split(None, 1)[0] atoms = { 'h': environ.get('REMOTE_ADDR', '-'), 'l': '-',