crashes with new bug activity quasi-comments on edge

Bug #352543 reported by Colin Watson on 2009-03-31
2
Affects Status Importance Assigned to Milestone
python-launchpad-bugs
Undecided
Unassigned

Bug Description

Parsing https://bugs.edge.launchpad.net/ubuntu/+source/libpcap/+bug/351591 crashes like this:

  File "/home/lp_archive/bin/syncbugbot", line 118, in <module>
    main()
  File "/home/lp_archive/bin/syncbugbot", line 111, in main
    process_bug(int(fields[0]), options.backport, fields[1:], failed)
  File "/home/lp_archive/bin/syncbugbot", line 76, in process_bug
    b.comments.add(Bug.NewComment(text=''.join(output), subject=b.title))
  File "/home/lp_archive/python/launchpadbugs/lphelper.py", line 256, in <lambda>
    if fget : fget = lambda s, n=fget.__name__ : getattr(s, n)()
  File "/home/lp_archive/python/launchpadbugs/html_bug.py", line 1459, in get_comments
    x = self.attachments
  File "/home/lp_archive/python/launchpadbugs/lphelper.py", line 256, in <lambda>
    if fget : fget = lambda s, n=fget.__name__ : getattr(s, n)()
  File "/home/lp_archive/python/launchpadbugs/html_bug.py", line 81, in func
    x.parse()
  File "/home/lp_archive/python/launchpadbugs/html_bug.py", line 692, in parse
    super(Attachments, self).parse()
  File "/home/lp_archive/python/launchpadbugs/attachmentsbase.py", line 337, in parse
    r = self.__comments.parse()
  File "/home/lp_archive/python/launchpadbugs/html_bug.py", line 770, in parse
    parse_error(m, "Comments.nr", xml=self.__xml, url=self.__url)
  File "/home/lp_archive/python/launchpadbugs/exceptions.py", line 220, in parse_error
    raise PythonLaunchpadBugsXMLParsingError(path, xml, url)

The new quasi-comments showing state changes in the bug (similar to the activity log) cause python-launchpad-bugs to fall over since they don't have a comment number.

For the time being I think it would be good to ignore such comments. I'll push up a branch that does this in a moment.

Markus Korn (thekorn) wrote :

Merged, thanks Colin for the patch.

------------------------------------------------------------
revno: 183
committer: Markus Korn <email address hidden>
branch nick: trunk
timestamp: Tue 2009-03-31 20:19:27 +0200
message:
  Ignore quasi-comments containing activity log information (LP: #352543).
    ------------------------------------------------------------
    revno: 182.1.1
    committer: Colin Watson <email address hidden>
    branch nick: ignore-activity-body
    timestamp: Tue 2009-03-31 18:17:36 +0100
    message:
      Ignore quasi-comments containing activity log information (LP: #352543).
------------------------------------------------------------

Changed in python-launchpad-bugs:
status: New → Fix Committed
Brian Murray (brian-murray) wrote :

This was merged with trunk a while ago so I'm setting it to Fix Released.

Changed in python-launchpad-bugs:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers