Skip to content

getbugs raises TypeError when some bugs exist & some don't #104

Description

@ddraayer

When I give getbugs a list of two bug ids, where one references a real bug and one doesn't, I get a traceback:

>>> bugz.getbugs([34567, 98765])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "[redacted]/lib/python3.7/site-packages/bugzilla/base.py", line 1085, in getbugs
    permissive=permissive)
  File "[redacted]/lib/python3.7/site-packages/bugzilla/base.py", line 1045, in _getbugs
    if i in self._listify(valdict.get("alias", None)):
TypeError: argument of type 'NoneType' is not iterable

If I give it ids for two non-existent bugs, the problem doesn't occur:

>>> bugz.getbugs([94567, 98765])
[None, None]

This is happening in version 2.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions