mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
53c46df323
commit
bc9dbf38b0
1 changed files with 5 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue