From 7b30ea5d3fa472b6a1f9d714f14bb4a796b6147d Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Tue, 3 Sep 2019 15:28:11 +0300 Subject: [PATCH] Fix keystone-credential-cleanup job with Python 3 Python 3 renamed ConfigParser module to configparser. This patch fixes compatibility with Python 3 for the keystone-credential-cleanup job. Change-Id: I6e34ba995d7a02f94b12162f0e5f8f326dfa8108 --- keystone/templates/bin/_cred-clean.py.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keystone/templates/bin/_cred-clean.py.tpl b/keystone/templates/bin/_cred-clean.py.tpl index 2361144fc7..9d1306a07e 100644 --- a/keystone/templates/bin/_cred-clean.py.tpl +++ b/keystone/templates/bin/_cred-clean.py.tpl @@ -23,7 +23,10 @@ limitations under the License. import os import sys -import ConfigParser +try: + import ConfigParser +except ImportError: + import configparser as ConfigParser import logging from sqlalchemy import create_engine