From a7820a272b19b79e7317ed8564a25019f2f7ce0d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 3 Jun 2020 17:01:44 +0800 Subject: [PATCH] ceph_deploy/conf: s/SafeConfigParser/ConfigParser/ as SafeConfigParser was renamed to ConfigParser in Python3 and in Python2 backport of configparser module, so let's just use the latter. Signed-off-by: Kefu Chai --- ceph_deploy/conf/cephdeploy.py | 9 +++------ setup.py | 2 -- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ceph_deploy/conf/cephdeploy.py b/ceph_deploy/conf/cephdeploy.py index 15854fd..3e109da 100644 --- a/ceph_deploy/conf/cephdeploy.py +++ b/ceph_deploy/conf/cephdeploy.py @@ -1,7 +1,4 @@ -try: - import configparser -except ImportError: - import ConfigParser as configparser +import configparser import logging import os from os import path @@ -146,9 +143,9 @@ def override_subcommand(section_name, section_items, args): return args -class Conf(configparser.SafeConfigParser): +class Conf(configparser.ConfigParser): """ - Subclasses from SafeConfigParser to give a few helpers for the ceph-deploy + Subclasses from ConfigParser to give a few helpers for the ceph-deploy configuration. Specifically, it addresses the need to work with custom sections that signal the usage of custom repositories. """ diff --git a/setup.py b/setup.py index ce03bd0..e59014f 100644 --- a/setup.py +++ b/setup.py @@ -14,8 +14,6 @@ install_requires = ['remoto>=1.1.4'] pyversion = sys.version_info[:2] if pyversion < (2, 7) or (3, 0) <= pyversion <= (3, 1): install_requires.append('argparse') -if pyversion < (3, 0): - install_requires.append('configparser') setup( name='ceph-deploy', -- 2.47.3