aboutsummaryrefslogtreecommitdiffhomepage
path: root/git-dch
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2009-09-15 13:40:55 +0200
committerGuido Günther <agx@sigxcpu.org>2009-09-15 13:40:55 +0200
commit78bcf5e946c0c7237ab2cbf97f82d75f5bb34d79 (patch)
tree1ecc7c1efbdda213074a46ca0b8950f0a3a64c60 /git-dch
parent564cfb3fd42697a4db9bb4289abb558818abea2b (diff)
catch config file parse errors
Closes: #545690
Diffstat (limited to 'git-dch')
-rwxr-xr-xgit-dch15
1 files changed, 10 insertions, 5 deletions
diff --git a/git-dch b/git-dch
index 7680a785..1051f82b 100755
--- a/git-dch
+++ b/git-dch
@@ -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")