summaryrefslogtreecommitdiffstats
path: root/bin/update-db
diff options
context:
space:
mode:
authorFlorian Weimer <fw@deneb.enyo.de>2005-09-24 15:35:43 +0000
committerFlorian Weimer <fw@deneb.enyo.de>2005-09-24 15:35:43 +0000
commit550207fc783b8065d02d949deb5668f1fa959686 (patch)
tree20fa01d549217b26ff39571588165f0ef2a9c3ab /bin/update-db
parentd3601dc2bf59f600cfe2f2f5f24c602de136c28f (diff)
bin/update-db:
Improve reporting of syntax errors. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@2155 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/update-db')
-rwxr-xr-xbin/update-db6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/update-db b/bin/update-db
index b990ce8430..8d22f696fc 100755
--- a/bin/update-db
+++ b/bin/update-db
@@ -37,6 +37,12 @@ cursor = db.writeTxn()
try:
warnings = db.readBugs(cursor, 'data')
+except SyntaxError, e:
+ if e.filename is None or e.lineno is None:
+ print "error:", e
+ else:
+ print "%s:%d: %s" % (e.filename, e.lineno, e.msg)
+ sys.exit(1)
except debian_support.ParseError, e:
e.printOut(sys.stderr)
sys.exit(1)

© 2014-2024 Faster IT GmbH | imprint | privacy policy