<s> import sys <EOL> def enabled ( ) : <EOL> return ( '<STR_LIT>' in sys . argv and <EOL> '<STR_LIT>' in sys . argv ) <EOL> def register_cli_opts ( ) : <EOL> from oslo . config import cfg <EOL> cli_opts = [ <EOL> cfg . StrOpt ( '<STR_LIT:host>' , <EOL> help = '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> cfg . IntOpt ( '<STR_LIT:port>' , <EOL> help = '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> ] <EOL> cfg . CONF . register_cli_opts ( cli_opts , '<STR_LIT>' ) <EOL> def init ( ) : <EOL> from oslo . config import cfg <EOL> CONF = cfg . CONF <EOL> if '<STR_LIT>' not in CONF : <EOL> return <EOL> if not ( CONF . remote_debug . host and CONF . remote_debug . port ) : <EOL> return <EOL> from rack . openstack . common . gettextutils import _ <EOL> from rack . openstack . common import log as logging <EOL> LOG = logging . getLogger ( __name__ ) <EOL> LOG . debug ( _ ( '<STR_LIT>' ) , <EOL> { '<STR_LIT:host>' : CONF . remote_debug . host , <EOL> '<STR_LIT:port>' : CONF . remote_debug . port } ) <EOL> from pydev import pydevd <EOL> pydevd . settrace ( host = CONF . remote_debug . host , <EOL> port = CONF . remote_debug . port , <EOL> stdoutToServer = False , <EOL> stderrToServer = False ) <EOL> LOG . warn ( _ ( '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) ) </s>
