Open Bug 1144518 Opened 9 years ago Updated 9 years ago

Cannot import from some bugs

Categories

(Developer Services :: Mercurial: qimportbz, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: jcranmer, Unassigned)

Details

$ 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.