From 68693d5ec7475cf265684a68521562501584c995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Sat, 21 Jan 2017 12:43:22 +0800 Subject: [PATCH] fix bug under py3 --- db_transfer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_transfer.py b/db_transfer.py index ec9152b..fa10a4b 100644 --- a/db_transfer.py +++ b/db_transfer.py @@ -278,7 +278,7 @@ class DbTransfer(TransferBase): import json config_path = get_config().MYSQL_CONFIG cfg = None - with open(config_path, 'r+') as f: + with open(config_path, 'rb+') as f: cfg = json.loads(f.read().decode('utf8')) if cfg: