예제 #1
0
 def setup_config(cls, use_file=False, argv=None):
     """Register CLI options & parse config file."""
     if argv is None:
         argv = sys.argv[1:]
     try:
         syntribos.config.register_opts()
         if use_file:
             CONF(argv, default_config_files=[ENV.get_default_conf_file()])
         else:
             CONF(argv, default_config_files=[])
     except Exception as exc:
         syntribos.config.handle_config_exception(exc)
예제 #2
0
파일: runner.py 프로젝트: knangia/syntribos
 def setup_config(cls, use_file=False, argv=None):
     """Register CLI options & parse config file."""
     if argv is None:
         argv = sys.argv[1:]
     try:
         syntribos.config.register_opts()
         if use_file:
             CONF(argv, default_config_files=[ENV.get_default_conf_file()])
         else:
             CONF(argv, default_config_files=[])
     except Exception as exc:
         syntribos.config.handle_config_exception(exc)
예제 #3
0
파일: runner.py 프로젝트: appknox/syntribos
 def setup_config(cls, use_file=False, argv=None):
     """Register CLI options & parse config file."""
     if argv is None:
         argv = sys.argv[1:]
     try:
         syntribos.config.register_opts()
         if use_file:
             # Parsing the args first in case a custom_install_root
             # was specified.
             CONF(argv, default_config_files=[])
             CONF(argv, default_config_files=[ENV.get_default_conf_file()])
         else:
             CONF(argv, default_config_files=[])
     except Exception as exc:
         syntribos.config.handle_config_exception(exc)
         if cls.worker:
             raise exc
         else:
             sys.exit(1)
예제 #4
0
 def setup_config(cls, use_file=False, argv=None):
     """Register CLI options & parse config file."""
     if argv is None:
         argv = sys.argv[1:]
     try:
         syntribos.config.register_opts()
         if use_file:
             # Parsing the args first in case a custom_install_root
             # was specified.
             CONF(argv, default_config_files=[])
             CONF(argv, default_config_files=[ENV.get_default_conf_file()])
         else:
             CONF(argv, default_config_files=[])
     except Exception as exc:
         syntribos.config.handle_config_exception(exc)
         if cls.worker:
             raise exc
         else:
             sys.exit(1)