]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
ceph_deploy/conf: s/SafeConfigParser/ConfigParser/
authorKefu Chai <kchai@redhat.com>
Wed, 3 Jun 2020 09:01:44 +0000 (17:01 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Jun 2020 09:19:27 +0000 (17:19 +0800)
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 <kchai@redhat.com>
ceph_deploy/conf/cephdeploy.py
setup.py

index 15854fda2fdb8695b3a318ad128b98c15e41beeb..3e109daf9c271758dce7dd133dd7fde218fa875e 100644 (file)
@@ -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.
     """
index ce03bd046368540e1e6d8ccc8e1c561deec1b151..e59014fd5bb5159aff03040d6ebb6204ca595194 100644 (file)
--- 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',