mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 00:03:10 +00:00
python 3 compatibility: import guard around ConfigParser
In python3 `ConfigParser` has become `configparser`. Added an import guard that aliases it back to the old name.
This commit is contained in:
committed by
Toshio Kuratomi
parent
53c46df323
commit
bc9dbf38b0
@@ -138,9 +138,13 @@ import sys
|
||||
import re
|
||||
import argparse
|
||||
from time import time
|
||||
import ConfigParser
|
||||
import ast
|
||||
|
||||
try:
|
||||
import ConfigParser
|
||||
except ImportError:
|
||||
import configparser as ConfigParser
|
||||
|
||||
try:
|
||||
import json
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user