From 7045112abfda5eca834a8c97211bd623c10c3de4 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Sat, 11 Mar 2023 20:59:36 -0500 Subject: [PATCH] Generalize the types of errors caught --- pytest_github/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_github/plugin.py b/pytest_github/plugin.py index cc5cbe8..5519c23 100644 --- a/pytest_github/plugin.py +++ b/pytest_github/plugin.py @@ -333,7 +333,7 @@ def pytest_itemcollected(self, item): self._issue_cache[url] = IssueWrapper(self.api.issue(username, repository, number), self) else: raise AttributeError('No valid github session found to access private issue.') - except (AttributeError, github3.exceptions.GitHubError) as e: + except (AttributeError, github3.exceptions.GitHubException) as e: errstr = "Unable to inspect github issue %s - %s" % (url, str(e)) warnings.warn(errstr, Warning)