[Secure-testing-commits] r43274 - bin

Chris Lamb lamby at moszumanska.debian.org
Tue Jul 19 06:47:26 UTC 2016


Author: lamby
Date: 2016-07-19 06:47:26 +0000 (Tue, 19 Jul 2016)
New Revision: 43274

Modified:
   bin/contact-maintainers
Log:
bin/contact-maintainers: Nicer error message if you mistype package name

Modified: bin/contact-maintainers
===================================================================
--- bin/contact-maintainers	2016-07-19 06:25:07 UTC (rev 43273)
+++ bin/contact-maintainers	2016-07-19 06:47:26 UTC (rev 43274)
@@ -6,6 +6,7 @@
 import subprocess
 import sys
 import tempfile
+import urllib2
 import warnings
 
 from jinja2 import Template
@@ -39,8 +40,13 @@
         maint = []
 
         graph = rdflib.Graph()
-        graph.parse('https://packages.qa.debian.org/{}/{}.rdf'
-                    .format(re.match('((?:lib)?.)', pkg).group(1), pkg))
+        try:
+            graph.parse('https://packages.qa.debian.org/{}/{}.rdf'
+                        .format(re.match('((?:lib)?.)', pkg).group(1), pkg))
+        except urllib2.HTTPError, exc:
+            if exc.code == 404:
+                raise ValueError("unknown package '{}'".format(pkg))
+            raise
         for contrib in graph[project : has_contributor]:
             names = [n for n in graph[contrib : is_named]]
             addresses = [urllib.unquote(m.group(1)) for m in




More information about the Secure-testing-commits mailing list