diff --git a/oslo/rootwrap/cmd.py b/oslo/rootwrap/cmd.py index 121a4cd..34ffe9a 100644 --- a/oslo/rootwrap/cmd.py +++ b/oslo/rootwrap/cmd.py @@ -34,7 +34,6 @@ from __future__ import print_function -import ConfigParser import logging import os import pwd @@ -42,6 +41,7 @@ import signal import subprocess import sys +from six import moves RC_UNAUTHORIZED = 99 RC_NOCOMMAND = 98 @@ -90,13 +90,13 @@ def main(): # Load configuration try: - rawconfig = ConfigParser.RawConfigParser() + rawconfig = moves.configparser.RawConfigParser() rawconfig.read(configfile) config = wrapper.RootwrapConfig(rawconfig) except ValueError as exc: msg = "Incorrect value in %s: %s" % (configfile, exc.message) _exit_error(execname, msg, RC_BADCONFIG, log=False) - except ConfigParser.Error: + except moves.configparser.Error: _exit_error(execname, "Incorrect configuration file: %s" % configfile, RC_BADCONFIG, log=False)