Show More
@@ -362,7 +362,7 b' class ArgParseConfigLoader(CommandLineConfigLoader):' | |||||
362 | raise NotImplementedError("subclasses must implement _add_arguments") |
|
362 | raise NotImplementedError("subclasses must implement _add_arguments") | |
363 |
|
363 | |||
364 | def _parse_args(self, args): |
|
364 | def _parse_args(self, args): | |
365 |
"""self.parser->self.parsed_data""" |
|
365 | """self.parser->self.parsed_data""" | |
366 | self.parsed_data, self.extra_args = self.parser.parse_known_args(args) |
|
366 | self.parsed_data, self.extra_args = self.parser.parse_known_args(args) | |
367 |
|
367 | |||
368 | def _convert_to_config(self): |
|
368 | def _convert_to_config(self): |
@@ -78,7 +78,10 b' class BaseAppConfigLoader(ArgParseConfigLoader):' | |||||
78 | def _add_arguments(self): |
|
78 | def _add_arguments(self): | |
79 | self._add_ipython_dir(self.parser) |
|
79 | self._add_ipython_dir(self.parser) | |
80 | self._add_log_level(self.parser) |
|
80 | self._add_log_level(self.parser) | |
81 | self._add_version(self.parser) |
|
81 | try: # Old versions of argparse don't have a version action | |
|
82 | self._add_version(self.parser) | |||
|
83 | except Exception: | |||
|
84 | pass | |||
82 |
|
85 | |||
83 |
|
86 | |||
84 | class Application(object): |
|
87 | class Application(object): |
General Comments 0
You need to be logged in to leave comments.
Login now