From 44bcf3b2106ef883f97a52c5651afa79e939aeb5 Mon Sep 17 00:00:00 2001 From: xsker <361011780@qq.com> Date: Sat, 10 Mar 2018 15:01:26 +0800 Subject: [PATCH] fix in ios run python is error --- src/you_get/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/you_get/common.py b/src/you_get/common.py index 2af97545..9062e4e6 100755 --- a/src/you_get/common.py +++ b/src/you_get/common.py @@ -19,7 +19,10 @@ from .util import log, term from .util.git import get_version from .util.strings import get_filename, unescape_html from . import json_output as json_output_ -sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8') +try: + sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8') +except: + pass SITES = { '163' : 'netease',