Cannot import from some bugs

NEW
Unassigned

Status

Developer Services
Mercurial: qimportbz
3 years ago
3 years ago

People

(Reporter: jcranmer, Unassigned)

Tracking

Details

(Reporter)

Description

3 years ago
$ hg qimport bz://1130854
[ ... ]
Traceback (most recent call last):
  File "/home/jcranmer/.mozbuild/version-control-tools/hgext/qimportbz/bzhandler.py", line 75, in bz_response
    bug = bz.Bug(self.ui, data)
  File "/home/jcranmer/.mozbuild/version-control-tools/hgext/qimportbz/bz.py", line 261, in __init__
    self.attachments = [Attachment.parse(self, a) for a in xml.findall("bug/attachment")]
  File "/home/jcranmer/.mozbuild/version-control-tools/hgext/qimportbz/bz.py", line 38, in parse
    return ctor(bug, node)
  File "/home/jcranmer/.mozbuild/version-control-tools/hgext/qimportbz/bz.py", line 143, in __init__
    who = posts[0].who

It turns out that the 'posts' list is empty after filtration.
The handling around this is all very flaky:
https://hg.mozilla.org/hgcustom/version-control-tools/file/3f82a2eceeea/hgext/qimportbz/bz.py#l137

The best solution may just be to fix bug 1003227 - since iirc the full email is shown over the new native rest API, so qimportbz wouldn't have to jump through as many hoops.
You need to log in before you can comment on or make changes to this bug.