[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] Use debianbts instead of SOAPpy



On Wed, Nov 1, 2017 at 10:51 PM, Ville Skyttä <ville.skytta@iki.fi> wrote:
> On Wed, Nov 1, 2017 at 12:52 PM, Raphael Hertzog <hertzog@debian.org> wrote:
>> On Tue, 31 Oct 2017, Ville Skyttä wrote:
>>> This switches to using debianbts instead of SOAPpy. To be applied over
>>> the LDAP->nm.d.o REST patch in https://bugs.debian.org/797223#10
>>
>> Thanks for this. Right now tracker.debian.org still runs jessie. Do
>> you know if your code works with python-debianbts 1.12 from jessie or if
>> I need to request the installation from jessie-backports ? (which has
>> 2.6.1~bpo8+1)
>
> I don't know; while doing the port I skimmed through old
> python-debianbts tags at GitHub, and IIRC all needed functions have
> always been there, which is why I didn't add any version to the
> dependency. All the testing I've done has been with the 2.6.1 shipping
> with Ubuntu 17.10.

Tested locally using jessie docker image + django 1.8 from backports
(so this is with debianbts 1.12): success, works.

Attached is a small patch on top of the previous one: 'fixed' is not a
documented value for a pending bug, 'done' is. Just happened to
notice, but did not see any effect in cases I tested with.
From baaa91765aab70e6bfbd6bf1bc125dc67816829e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Tue, 7 Nov 2017 22:49:34 +0200
Subject: [PATCH 2/2] BTS: Check for pending == 'done' instead of 'fixed'

https://wiki.debian.org/DebbugsSoapInterface#line-55
---
 distro_tracker/vendor/debian/tracker_tasks.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/distro_tracker/vendor/debian/tracker_tasks.py b/distro_tracker/vendor/debian/tracker_tasks.py
index 3478c06..3dc8d3b 100644
--- a/distro_tracker/vendor/debian/tracker_tasks.py
+++ b/distro_tracker/vendor/debian/tracker_tasks.py
@@ -247,7 +247,7 @@ class UpdatePackageBugStats(BaseTask):
         bug_stats = {}
         bugs = debianbts.get_status(*bug_numbers)
         for bug in bugs:
-            if bug.done or bug.fixed_versions or bug.pending == 'fixed':
+            if bug.done or bug.fixed_versions or bug.pending == 'done':
                 continue
 
             bug_stats.setdefault(bug.package, 0)
-- 
2.14.1


Reply to: