From 3606abc207d15f4e4d87c95fd3a1a8d97e9f2686 Mon Sep 17 00:00:00 2001 From: Sebastiaan ten Pas Date: Mon, 26 Apr 2021 15:00:47 +0000 Subject: [PATCH] Fix teamcity-messages for pylint >= 2.8 --- teamcity/pylint_reporter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/teamcity/pylint_reporter.py b/teamcity/pylint_reporter.py index f33597b..f25dec6 100644 --- a/teamcity/pylint_reporter.py +++ b/teamcity/pylint_reporter.py @@ -4,7 +4,11 @@ import os from pylint import reporters -from pylint.__pkginfo__ import version as pylint_version +try: + from pylint import version as pylint_version +except ImportError: + # Backwards compatibility for pylint < 2.8.0 + from pylint.__pkginfo__ import version as pylint_version from teamcity.common import get_class_fullname from teamcity import messages