ENH: For python3.2+ use ConfigPaser which replaces SafeConfigParser

Current SafeConfigParser alias to be dropped in future python versions
pull/183/head
Steven Hiscocks 2013-04-21 10:30:13 +01:00
parent 3936793413
commit b182c5b5d4
1 changed files with 6 additions and 2 deletions

View File

@ -27,8 +27,12 @@ __date__ = '$Date$'
__copyright__ = 'Copyright (c) 2007 Yaroslav Halchenko'
__license__ = 'GPL'
import logging, os
from ConfigParser import SafeConfigParser
import logging, os, sys
if sys.version_info >= (3,2): # pragma: no cover
# SafeConfigParser deprecitated from python 3.2 (renamed ConfigParser)
from configparser import ConfigParser as SafeConfigParser
else: # pragma: no cover
from ConfigParser import SafeConfigParser
# Gets the instance of the logger.
logSys = logging.getLogger(__name__)