Mercurial > p > roundup > code
comparison roundup/configuration.py @ 8454:588ae856cd57
fix: python 3.{7,8,10} raise configfile.ParsingError not RuntimeError
when adding broken syntax:
=foo
to logging config file.
These version failing in CI. 3.9 and 3.11 are also
affected. RuntimeError was added in 3.12.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 22 Sep 2025 13:09:49 -0400 |
| parents | e91ff70e4563 |
| children | 9f7e863fd1cd |
comparison
equal
deleted
inserted
replaced
| 8453:e5bd50120b5a | 8454:588ae856cd57 |
|---|---|
| 2637 try: | 2637 try: |
| 2638 logging.config.fileConfig( | 2638 logging.config.fileConfig( |
| 2639 _file, | 2639 _file, |
| 2640 disable_existing_loggers=self[ | 2640 disable_existing_loggers=self[ |
| 2641 "LOGGING_DISABLE_LOGGERS"]) | 2641 "LOGGING_DISABLE_LOGGERS"]) |
| 2642 except (ValueError, RuntimeError, | 2642 except (ValueError, RuntimeError, configparser.ParsingError, |
| 2643 KeyError, NameError, ModuleNotFoundError) as e: | 2643 KeyError, NameError, ModuleNotFoundError) as e: |
| 2644 # configparser.DuplicateOptionError includes | 2644 # configparser.DuplicateOptionError includes |
| 2645 # filename, line number and a useful error. | 2645 # filename, line number and a useful error. |
| 2646 # so we don't have to augment it. | 2646 # so we don't have to augment it. |
| 2647 context = [] | 2647 context = [] |
