From a4d27226ade3f7cd62db9d2ba3a65405883c5ceb Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Sat, 6 Apr 2019 11:14:40 -0700 Subject: [PATCH] Import configparser in a consistent way. Filetype detection fails when mixing backport/builtin versions. --- detect_secrets/plugins/high_entropy_strings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/detect_secrets/plugins/high_entropy_strings.py b/detect_secrets/plugins/high_entropy_strings.py index 45dfb977f..cadf25789 100644 --- a/detect_secrets/plugins/high_entropy_strings.py +++ b/detect_secrets/plugins/high_entropy_strings.py @@ -1,6 +1,9 @@ from __future__ import absolute_import -import configparser +try: + from backports import configparser +except ImportError: # pragma: no cover + import configparser import math import os import re