[Secure-testing-commits] r2155 - bin

Florian Weimer fw at costa.debian.org
Sat Sep 24 15:35:43 UTC 2005


Author: fw
Date: 2005-09-24 15:35:43 +0000 (Sat, 24 Sep 2005)
New Revision: 2155

Modified:
   bin/update-db
Log:
bin/update-db:
  Improve reporting of syntax errors.


Modified: bin/update-db
===================================================================
--- bin/update-db	2005-09-24 14:24:19 UTC (rev 2154)
+++ bin/update-db	2005-09-24 15:35:43 UTC (rev 2155)
@@ -37,6 +37,12 @@
 
 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)




More information about the Secure-testing-commits mailing list