From 79222e327f9df6335b58e17a6c8dd0dc44b86c17 Mon Sep 17 00:00:00 2001 From: "ChangBo Guo(gcb)" Date: Sat, 26 Dec 2015 13:13:37 +0800 Subject: [PATCH] Fix AttributeError for LogAdapter LogAdapter object has no attribute 'warn' but has attribute 'warning'. Closes-Bug: #1529321 Change-Id: I0e0bd0a3dbc4bb5c1f0b343a8809e53491a1da5f --- swift/common/db_replicator.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/swift/common/db_replicator.py b/swift/common/db_replicator.py index b67b7152..d4abf25e 100644 --- a/swift/common/db_replicator.py +++ b/swift/common/db_replicator.py @@ -174,11 +174,12 @@ class Replicator(Daemon): if not self.rsync_module: self.rsync_module = '{replication_ip}::%s' % self.server_type if config_true_value(conf.get('vm_test_mode', 'no')): - self.logger.warn('Option %(type)s-replicator/vm_test_mode is ' - 'deprecated and will be removed in a future ' - 'version. Update your configuration to use ' - 'option %(type)s-replicator/rsync_module.' - % {'type': self.server_type}) + self.logger.warning('Option %(type)s-replicator/vm_test_mode ' + 'is deprecated and will be removed in a ' + 'future version. Update your configuration' + ' to use option %(type)s-replicator/' + 'rsync_module.' + % {'type': self.server_type}) self.rsync_module += '{replication_port}' self.reclaim_age = float(conf.get('reclaim_age', 86400 * 7)) swift.common.db.DB_PREALLOCATION = \