[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 6.0-37-g3088578

Sandro Tosi morph at debian.org
Sat Aug 27 19:03:30 UTC 2011


The following commit has been merged in the master branch:
commit 5bbed39cd3c8671f546345ee0856d3baa0d60225
Author: Sandro Tosi <morph at debian.org>
Date:   Sat Aug 27 18:59:44 2011 +0200

    fix buildd.d.o checks after the service changes layout; Closes: #612520

diff --git a/debian/changelog b/debian/changelog
index 59ac693..25d3fdf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,8 +38,10 @@ reportbug (6.2) UNRELEASED; urgency=low
   * introduce the new --latest-first cli options to sort the bug reports lists
     to show the latest bugs first; thanks to Marcelo Magallon for the bug report
     and the idea; Closes: #66917
+  * reportbug/checkbuildd.py
+    - fix buildd.d.o checks after the service changes layout; Closes: #612520
 
- -- Sandro Tosi <morph at debian.org>  Sat, 27 Aug 2011 16:59:21 +0200
+ -- Sandro Tosi <morph at debian.org>  Sat, 27 Aug 2011 18:58:39 +0200
 
 reportbug (6.1) unstable; urgency=low
 
diff --git a/reportbug/checkbuildd.py b/reportbug/checkbuildd.py
index 7a49074..604bdf4 100644
--- a/reportbug/checkbuildd.py
+++ b/reportbug/checkbuildd.py
@@ -30,9 +30,9 @@ from reportbug.exceptions import (
     NoNetwork,
     )
 
-BUILDD_URL = 'http://buildd.debian.org/build.php?arch=%s&pkg=%s'
+BUILDD_URL = 'https://buildd.debian.org/build.php?arch=%s&pkg=%s'
 
-# This is easy; just look for succeeded in an em block...
+# Check for successful in a 'td' block
 
 class BuilddParser(sgmllib.SGMLParser):
     def __init__(self):
@@ -58,12 +58,12 @@ class BuilddParser(sgmllib.SGMLParser):
         if not mode and data is not None: data = ' '.join(data.split())
         return data
 
-    def start_em(self, attrs):
+    def start_td(self, attrs):
         self.save_bgn()
 
-    def end_em(self):
+    def end_td(self):
         data = self.save_end()
-        if data and 'successful' in data:
+        if data and 'successful' in data.lower():
             self.found_succeeded=True
 
 def check_built(src_package, timeout, arch=None, http_proxy=None):
diff --git a/test/test_checkbuildd.py b/test/test_checkbuildd.py
index d25d86c..e9ebec3 100644
--- a/test/test_checkbuildd.py
+++ b/test/test_checkbuildd.py
@@ -1,9 +1,11 @@
 import unittest2
 
 from reportbug import checkbuildd
+from nose.plugins.attrib import attr
 
 class TestCheckbuildd(unittest2.TestCase):
 
-    def test_archname(self):
-        archname = checkbuildd.archname()
-        self.assertNotEqual(archname, '')
+    @attr('network') #marking the test as using network
+    def test_check_built(self):
+        built = checkbuildd.check_built('gkrellm', 60)
+        self.assertTrue(built)

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list