diff options
author | Guido Günther <agx@sigxcpu.org> | 2009-09-15 13:40:55 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2009-09-15 13:40:55 +0200 |
commit | 78bcf5e946c0c7237ab2cbf97f82d75f5bb34d79 (patch) | |
tree | 1ecc7c1efbdda213074a46ca0b8950f0a3a64c60 /git-dch | |
parent | 564cfb3fd42697a4db9bb4289abb558818abea2b (diff) |
catch config file parse errors
Closes: #545690
Diffstat (limited to 'git-dch')
-rwxr-xr-x | git-dch | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1,7 +1,7 @@ #!/usr/bin/python -u # vim: set fileencoding=utf-8 : # -# (C) 2007,2008 Guido Guenther <agx@sigxcpu.org> +# (C) 2007, 2008, 2009 Guido Guenther <agx@sigxcpu.org> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -18,9 +18,10 @@ # """Generate Debian changelog entries from git commit messages""" -import sys -import re +import ConfigParser import os.path +import re +import sys import shutil import subprocess import gbp.command_wrappers as gbpc @@ -274,8 +275,12 @@ def main(argv): found_snapshot_header = False first_commit = None - parser = GbpOptionParser(command=os.path.basename(argv[0]), prefix='', - usage='%prog [options] paths') + try: + parser = GbpOptionParser(command=os.path.basename(argv[0]), prefix='', + usage='%prog [options] paths') + except ConfigParser.ParsingError, err: + print >>sys.stderr, err + return 1 range_group = GbpOptionGroup(parser, "commit range options", "which commits to add to the changelog") version_group = GbpOptionGroup(parser, "release & version number options", "what version number and release to use") commit_group = GbpOptionGroup(parser, "commit message formatting", "howto format the changelog entries") |