Commit e200557e authored by Adrian DC's avatar Adrian DC
Browse files

fix(gitlab): catch 'StopIteration' exceptions upon missing boards

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent a4ed3117
Loading
Loading
Loading
Loading
+2 −2
Changes for src/features/gitlab.py: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -747,7 +747,7 @@ class GitLabFeature:
        try:
            issues_board = next(board for board in project.boards.list(get_all=True)
                                if board.name == name and isinstance(board, ProjectBoard))
        except GitlabGetError:
        except (GitlabGetError, StopIteration):
            project.boards.create({
                'name': name,
            })
@@ -769,7 +769,7 @@ class GitLabFeature:
                                  for board_list in issues_board.lists.list(get_all=True)
                                  if board_list.label['name'] == list_json['label']
                                  and isinstance(board_list, ProjectBoardList))
            except (GitlabGetError, IndexError):
            except (GitlabGetError, IndexError, StopIteration):
                label = project.labels.get(list_json['label'],
                                           include_ancestor_groups=True)
                issues_board.lists.create({