summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cherrypy/lib/reprconf.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/cherrypy/lib/reprconf.py b/cherrypy/lib/reprconf.py
index 19b6511a..c0dba34e 100644
--- a/cherrypy/lib/reprconf.py
+++ b/cherrypy/lib/reprconf.py
@@ -19,18 +19,12 @@ and the handler must be either a callable or a context manager.
"""
from cherrypy._cpcompat import text_or_bytes
-
-try:
- # Python 3.0+
- from configparser import ConfigParser
-except ImportError:
- from ConfigParser import ConfigParser
+from six.moves import configparser
+from six.moves import builtins
import operator as _operator
import sys
-from six.moves import builtins
-
class NamespaceSet(dict):
@@ -152,7 +146,7 @@ class Config(dict):
self.namespaces({k: v})
-class Parser(ConfigParser):
+class Parser(configparser.ConfigParser):
"""Sub-class of ConfigParser that keeps the case of options and that
raises an exception if the file cannot be read.