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)


_______________________________________________
Secure-testing-commits mailing list
Secure-testing-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/secure-testing-commits

Reply via email to