From: Kefu Chai Date: Wed, 3 Jun 2020 09:01:44 +0000 (+0800) Subject: ceph_deploy/conf: s/SafeConfigParser/ConfigParser/ X-Git-Tag: v2.1.0~17^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a7820a272b19b79e7317ed8564a25019f2f7ce0d;p=ceph-deploy.git 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 --- 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',