<s> from __future__ import print_function <EOL> import argparse <EOL> import distutils . spawn <EOL> import getpass <EOL> import logging <EOL> import os <EOL> import sys <EOL> from . server import env <EOL> logger = logging . getLogger ( __name__ ) <EOL> DESCRIPTION = """<STR_LIT>""" <EOL> def run_gunicorn ( ) : <EOL> """<STR_LIT>""" <EOL> parser = argparse . ArgumentParser ( <EOL> description = DESCRIPTION , <EOL> formatter_class = argparse . RawTextHelpFormatter ) <EOL> parser . parse_args ( ) <EOL> gunicorn_path = distutils . spawn . find_executable ( '<STR_LIT>' ) <EOL> if not gunicorn_path : <EOL> print ( '<STR_LIT>' , file = sys . stderr ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> address = '<STR_LIT>' % ( <EOL> env . source ( '<STR_LIT>' ) , <EOL> env . source ( '<STR_LIT>' ) <EOL> ) <EOL> args = [ <EOL> gunicorn_path , '<STR_LIT>' , <EOL> '<STR_LIT>' , env . source ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' , env . source ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' , '<STR_LIT:100>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , env . source ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' , env . source ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' , env . source ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' , address , <EOL> ] <EOL> if env . source ( '<STR_LIT>' ) != '<STR_LIT>' : <EOL> args . append ( '<STR_LIT>' ) <EOL> user = env . source ( '<STR_LIT>' ) <EOL> group = env . source ( '<STR_LIT>' ) <EOL> if user or group : <EOL> if getpass . getuser ( ) == '<STR_LIT:root>' : <EOL> if user : <EOL> logger . info ( '<STR_LIT>' % user ) <EOL> args . append ( '<STR_LIT>' ) <EOL> args . append ( user ) <EOL> if group : <EOL> logger . info ( '<STR_LIT>' % user ) <EOL> args . append ( '<STR_LIT>' ) <EOL> args . append ( group ) <EOL> else : <EOL> logger . warn ( '<STR_LIT>' ) <EOL> args += env . source ( '<STR_LIT>' ) <EOL> args . append ( '<STR_LIT>' ) <EOL> os . execl ( * [ str ( v ) for v in args ] ) </s>
