Thanks. I think that is easier to read. I particularly like the constants
instead of the file extensions.

It's unlikely to be a big problem in this case, but it would be good style
to bring the read call up above the conditional, wrap it in a try/finally
and close the file in the finally block.

As is, you duplicate the read and close call and don't guarantee to close
if there's an exception.

Could you make that change and then I'll merge this?

In gunicorn/six.py:

> @@ -286,6 +286,50 @@ def StringIO(buf=''):
>  _add_doc(u, """Text literal""")
>
>
> +def _check_if_pyc(fname):

I made a commit again. Hope this is alright!

—
Reply to this email directly or view it on
GitHub<https://github.com/benoitc/gunicorn/pull/696/files#r10633817>
.