From 6bfae30cd6e9c28f4ccfa3e16476bc57546cfeff Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Thu, 21 Mar 2019 15:09:14 -0700 Subject: [PATCH] :bug: Patch backports configparser too We previously patched configparser with `EfficientParsingError`, however this did not patch the backports version present on Python 2. --- detect_secrets/plugins/common/ini_file_parser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/detect_secrets/plugins/common/ini_file_parser.py b/detect_secrets/plugins/common/ini_file_parser.py index bd523026f..b412ef6d1 100644 --- a/detect_secrets/plugins/common/ini_file_parser.py +++ b/detect_secrets/plugins/common/ini_file_parser.py @@ -1,6 +1,9 @@ from __future__ import unicode_literals -import configparser +try: + from backports import configparser +except ImportError: # pragma: no cover + import configparser import re