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.pull/4420/head
parent
53c46df323
commit
bc9dbf38b0
|
@ -138,9 +138,13 @@ import sys
|
||||||
import re
|
import re
|
||||||
import argparse
|
import argparse
|
||||||
from time import time
|
from time import time
|
||||||
import ConfigParser
|
|
||||||
import ast
|
import ast
|
||||||
|
|
||||||
|
try:
|
||||||
|
import ConfigParser
|
||||||
|
except ImportError:
|
||||||
|
import configparser as ConfigParser
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import json
|
import json
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
Loading…
Reference in New Issue