summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pycadf/audit/api.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/pycadf/audit/api.py b/pycadf/audit/api.py
index 88ccef8..c788bdf 100644
--- a/pycadf/audit/api.py
+++ b/pycadf/audit/api.py
@@ -17,11 +17,12 @@
import ast
import collections
-import ConfigParser
import os
from oslo.config import cfg
import urlparse
+from six.moves import configparser
+
from pycadf import cadftaxonomy as taxonomy
from pycadf import cadftype
from pycadf import credential
@@ -86,7 +87,7 @@ class OpenStackAuditApi(object):
if cfg_file:
try:
- audit_map = ConfigParser.SafeConfigParser()
+ audit_map = configparser.SafeConfigParser()
audit_map.readfp(open(cfg_file))
try:
@@ -95,22 +96,22 @@ class OpenStackAuditApi(object):
try:
self._default_target_endpoint_type = \
audit_map.get('DEFAULT', 'target_endpoint_type')
- except ConfigParser.NoOptionError:
+ except configparser.NoOptionError:
pass
- except ConfigParser.NoSectionError:
+ except configparser.NoSectionError:
pass
try:
self._body_actions = dict(audit_map.items('body_actions'))
- except ConfigParser.Error:
+ except configparser.Error:
pass
try:
self._service_endpoints = \
dict(audit_map.items('service_endpoints'))
- except ConfigParser.Error:
+ except configparser.Error:
pass
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
raise PycadfAuditApiConfigError(
'Error parsing audit map file: %s' % err)