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
commit9ae6b2bc4f258c696e58e21fa48be2b1633af8d7 (patch)
tree1bda5bd30e32eb7e2c7e31248ad94e6aaee90d5d /bin/update-db
parent8ed134e0e365b6862ba3badb9fff18fb706d17cc (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