| 446 | |
| 447 | @catch_config_error |
| 448 | def initialize(self, argv=None): |
| 449 | # don't hook up crash handler before parsing command-line |
| 450 | self.parse_command_line(argv) |
| 451 | self.init_crash_handler() |
| 452 | if self.subapp is not None: |
| 453 | # stop here if subapp is taking over |
| 454 | return |
| 455 | # save a copy of CLI config to re-load after config files |
| 456 | # so that it has highest priority |
| 457 | cl_config = deepcopy(self.config) |
| 458 | self.init_profile_dir() |
| 459 | self.init_config_files() |
| 460 | self.load_config_file() |
| 461 | # enforce cl-opts override configfile opts: |
| 462 | self.update_config(cl_config) |