diff options
author | Guido Günther <agx@sigxcpu.org> | 2023-03-02 17:55:52 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2023-03-02 17:55:52 +0100 |
commit | cf5b2ad3a3716487f1247e80a38c742d0cc5b865 (patch) | |
tree | 619c9cb6b788ec5a619f654d66d9be3b1a0e6787 | |
parent | c72464b901f6e0a1710404b3ca85f785fba467fd (diff) |
config: Print sensible error message on duplicate sections
Don't confuse users with a backtrace.
-rw-r--r-- | gbp/config.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gbp/config.py b/gbp/config.py index 4f9e91d3..aa5e1889 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -600,7 +600,7 @@ class GbpOptionParser(OptionParser): try: self.parse_config_files() - except configparser.ParsingError as err: + except (configparser.ParsingError, configparser.DuplicateSectionError) as err: raise GbpError(str(err) + "\nSee 'man gbp.conf' for the format.") OptionParser.__init__(self, option_class=GbpOption, |