From 1f690df60c0ce7b627c4ebceaecaa5370ff10042 Mon Sep 17 00:00:00 2001 From: Luong Anh Tuan Date: Mon, 12 Sep 2016 15:01:29 +0700 Subject: [PATCH] Use ConfigParser instead of SafeConfigParser SafeConfigParser supports interpolation on top of ConfigParser in Python 2, and SafeConfigParser is deprecated in Python 3.2 and log warning like " DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead." So we can use ConfigParser if we don't need interpolation. Change-Id: I7e399b3cb90ded909e0d777a4d10c44f1e9299da Closes-Bug: #1618666 --- swift/common/container_sync_realms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/common/container_sync_realms.py b/swift/common/container_sync_realms.py index 2c4c944add..70d376d2e5 100644 --- a/swift/common/container_sync_realms.py +++ b/swift/common/container_sync_realms.py @@ -63,7 +63,7 @@ class ContainerSyncRealms(object): if mtime != self.conf_path_mtime: self.conf_path_mtime = mtime try: - conf = configparser.SafeConfigParser() + conf = configparser.ConfigParser() conf.read(self.conf_path) except configparser.ParsingError as err: self.logger.error(