Simple try/except import trick

This commit is contained in:
Guillaume Ayoub 2013-10-29 14:09:46 +01:00
parent 830774824e
commit 92b3cf41bc

View File

@ -44,13 +44,10 @@ from . import config, log
# pylint: disable=F0401
try:
from configparser import ConfigParser
from io import StringIO
except ImportError:
from ConfigParser import ConfigParser
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
# pylint: enable=F0401