@@ -46,11 +46,12 @@ def _get_config_files(env=None):
4646 return [os .path .join (dirname , fname ) for fname in files ]
4747
4848
49- def _init_configuration ():
49+ def _init_configuration (prog = None ):
5050 # the configuration will be read into the cfg.CONF global data structure
5151 conf_files = _get_config_files ()
5252 config .register_common_config_options ()
53- config .init (sys .argv [1 :], default_config_files = conf_files )
53+ config .init (sys .argv [1 :], default_config_files = conf_files ,
54+ prog = prog )
5455 config .setup_logging ()
5556 config .set_config_defaults ()
5657 if not cfg .CONF .config_file :
@@ -59,7 +60,7 @@ def _init_configuration():
5960 " the '--config-file' option!" ))
6061
6162
62- def boot_server (server_func ):
63+ def boot_server (server_func , prog = None ):
6364 # During the call to gmr.TextGuruMeditation.setup_autorun(), Guru
6465 # Meditation Report tries to start logging.
6566 # Set a handler here to accommodate this.
@@ -71,7 +72,7 @@ def boot_server(server_func):
7172 if not logger .handlers :
7273 logger .addHandler (sys_logging .StreamHandler ())
7374
74- _init_configuration ()
75+ _init_configuration (prog = prog )
7576 config .setup_gmr ()
7677 try :
7778 return server_func ()
0 commit comments