From 44185c9fffd9f9841690dea7ef9d481f6b0265e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Mon, 5 Jun 2017 11:42:11 +0800 Subject: [PATCH] fix KeyError --- db_transfer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_transfer.py b/db_transfer.py index e758381..3a1441d 100644 --- a/db_transfer.py +++ b/db_transfer.py @@ -139,7 +139,7 @@ class TransferBase(object): if not cfgchange and port in ServerPool.get_instance().tcp_ipv6_servers_pool: relay = ServerPool.get_instance().tcp_ipv6_servers_pool[port] for name in merge_config_keys: - if name in cfg and not self.cmp(cfg[name], relay._config[name]): + if (name in cfg) and ((name not in relay._config) or not self.cmp(cfg[name], relay._config[name])): cfgchange = True break