diff --git a/lib/galaxy/tools/error_reports/plugins/gitlab.py b/lib/galaxy/tools/error_reports/plugins/gitlab.py index 9abf32a94ec4..9127deb2943c 100644 --- a/lib/galaxy/tools/error_reports/plugins/gitlab.py +++ b/lib/galaxy/tools/error_reports/plugins/gitlab.py @@ -47,16 +47,16 @@ def __init__(self, **kwargs): self.gitlab.auth() except gitlab.GitlabAuthenticationError: - log.error("GitLab error reporting - Could not authenticate with GitLab.", exc_info=True) + log.exception("GitLab error reporting - Could not authenticate with GitLab.") self.gitlab = None except gitlab.GitlabParsingError: - log.error("GitLab error reporting - Could not parse GitLab message.", exc_info=True) + log.exception("GitLab error reporting - Could not parse GitLab message.") self.gitlab = None except (gitlab.GitlabConnectionError, gitlab.GitlabHttpError): - log.error("GitLab error reporting - Could not connect to GitLab.", exc_info=True) + log.exception("GitLab error reporting - Could not connect to GitLab.") self.gitlab = None except gitlab.GitlabError: - log.error("GitLab error reporting - General error communicating with GitLab.", exc_info=True) + log.exception("GitLab error reporting - General error communicating with GitLab.") self.gitlab = None def gitlab_connect(self): @@ -195,34 +195,29 @@ def submit_report(self, dataset, job, tool, **kwargs): ) except gitlab.GitlabCreateError: - log.error("GitLab error reporting - Could not create the issue on GitLab.", exc_info=True) + log.exception("GitLab error reporting - Could not create the issue on GitLab.") return ("Internal Error.", "danger") except gitlab.GitlabOwnershipError: - log.error( - "GitLab error reporting - Could not create the issue on GitLab due to ownership issues.", - exc_info=True, - ) + log.exception("GitLab error reporting - Could not create the issue on GitLab due to ownership issues.") return ("Internal Error.", "danger") except gitlab.GitlabSearchError: - log.error("GitLab error reporting - Could not find repository on GitLab.", exc_info=True) + log.exception("GitLab error reporting - Could not find repository on GitLab.") return ("Internal Error.", "danger") except gitlab.GitlabAuthenticationError: - log.error("GitLab error reporting - Could not authenticate with GitLab.", exc_info=True) + log.exception("GitLab error reporting - Could not authenticate with GitLab.") return ("Internal Error.", "danger") except gitlab.GitlabParsingError: - log.error("GitLab error reporting - Could not parse GitLab message.", exc_info=True) + log.exception("GitLab error reporting - Could not parse GitLab message.") return ("Internal Error.", "danger") except (gitlab.GitlabConnectionError, gitlab.GitlabHttpError): - log.error("GitLab error reporting - Could not connect to GitLab.", exc_info=True) + log.exception("GitLab error reporting - Could not connect to GitLab.") return ("Internal Error.", "danger") except gitlab.GitlabError: - log.error("GitLab error reporting - General error communicating with GitLab.", exc_info=True) + log.exception("GitLab error reporting - General error communicating with GitLab.") return ("Internal Error.", "danger") except Exception: - log.error( - "GitLab error reporting - Error reporting to GitLab had an exception that could not be " - "determined.", - exc_info=True, + log.exception( + "GitLab error reporting - Error reporting to GitLab had an exception that could not be determined.", ) return ("Internal Error.", "danger") else: diff --git a/pyproject.toml b/pyproject.toml index ae5fcc88b942..ed8f9cb93a85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -191,7 +191,7 @@ target-version = "py37" # E402 module level import not at top of file # TODO, we would like to improve this. # E501 is line length (delegated to black) # G* are TODOs -ignore = ["B008", "B9", "E402", "E501", "G001", "G002", "G004", "G201"] +ignore = ["B008", "B9", "E402", "E501", "G001", "G002", "G004"] exclude = [ "lib/tool_shed/test/test_data/repos" ]