summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bts/interfaces.py45
-rw-r--r--btslink.cfg1
2 files changed, 13 insertions, 33 deletions
diff --git a/bts/interfaces.py b/bts/interfaces.py
index 6148039..1169b72 100644
--- a/bts/interfaces.py
+++ b/bts/interfaces.py
@@ -28,44 +28,25 @@
# SUCH DAMAGE.
###############################################################################
-import ldap, sys, os, re, commands, urllib
+import ldap, sys, os, re, commands
###############################################################################
# UserTags stuff
+import SOAPpy
+
_usertags = {}
def _parseUserTags(cnf):
- tag = None
- bugs = ""
- last = 0
-
- f = urllib.urlopen(cnf.get('general', 'tagsidx'))
-
- for l in f.readlines():
- l = l.rstrip()
- if l == "":
- if tag:
- for b in bugs.split(','):
- b = b.strip()
- if b in _usertags:
- _usertags[b].append(tag)
- else:
- _usertags[b] = [tag]
- tag = None
- bugs = ""
- last = 0
- continue
- if l.startswith('Tag: '):
- last = 1
- tag = l[4:].strip()
- continue
- if l.startswith('Bugs: '):
- last = 2
- bugs = l[5:]
- continue
- if l.startswith(' ') and last is 2:
- bugs += l
- f.close()
+ url = 'http://bugs.debian.org/cgi-bin/soap.cgi'
+ namespace = 'Debbugs/SOAP'
+ server = SOAPpy.SOAPProxy(url, namespace)
+ map = server.get_usertag(cnf.get('general', 'user'));
+ for tag, v in map._asdict().iteritems():
+ for b in v:
+ if b in _usertags:
+ _usertags[b].append(tag)
+ else:
+ _usertags[b] = [tag]
###############################################################################
# Reports Stuff
diff --git a/btslink.cfg b/btslink.cfg
index abedb9c..e8f22ed 100644
--- a/btslink.cfg
+++ b/btslink.cfg
@@ -1,7 +1,6 @@
[general]
user = bts-link-upstream@lists.alioth.debian.org
reply-to = bts-link-devel@lists.alioth.debian.org
-tagsidx = http://bugs.debian.org/~ajt/madcoder-upstream-link
spool = /home/madcoder/debian/bts-link/db-h
cookies = /home/madcoder/debian/bts-link/cookies.txt
ldap = ldap://bts2ldap.debian.net:10101