Parse bug title, reporter in launchpad.
[jelmer/bts-link.git] / remote / launchpad.py
index b399b30919dead0877a02489adae7f09c5c0c232..0e379171820e5ebcec7043b1c391228c3255612c 100644 (file)
@@ -37,18 +37,25 @@ class LaunchpadTask:
     def __init__(self, msg):
         self.product = msg["task"]
         self.status = msg["status"]
+        self.assignee = msg["assignee"]
+        self.reporter = msg["reporter"]
 
 
 class LaunchpadBug:
     def __init__(self, text):
         bug = rfc822.Message(text)
         dupestr = bug.get("duplicate-of", None)
-        if dupestr == "":
+        if dupestr is None or dupestr == "":
             self.duplicate_of = None
         else:
             self.duplicate_of = int(dupestr)
         self.id = int(bug["bug"])
         self.tasks = {}
+        self.title = bug["title"]
+        self.repoter = bug["reporter"]
+
+        import pdb
+        pdb.set_trace()
 
         # Find the task related to the product we're dealing 
         # with at the moment