파이썬3 호환성 추가

This commit is contained in:
joyfuI
2020-11-08 16:06:34 +09:00
parent b7d9501802
commit 7bec0524e6
4 changed files with 5 additions and 3 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
.idea/ .idea/
.venv/ .venv/
*.pyo *.pyo
__pycache__/
test/ test/

View File

@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from plugin import blueprint, menu, plugin_load, plugin_unload, plugin_info from .plugin import blueprint, menu, plugin_load, plugin_unload, plugin_info

View File

@@ -59,7 +59,7 @@ class Logic(object):
logger.debug(subprocess.check_output([sys.executable, '-m', 'pip', 'install', '--upgrade', 'youtube-dl'], universal_newlines=True)) logger.debug(subprocess.check_output([sys.executable, '-m', 'pip', 'install', '--upgrade', 'youtube-dl'], universal_newlines=True))
# 편의를 위해 json 파일 생성 # 편의를 위해 json 파일 생성
from plugin import plugin_info from .plugin import plugin_info
Util.save_from_dict_to_json(plugin_info, os.path.join(os.path.dirname(__file__), 'info.json')) Util.save_from_dict_to_json(plugin_info, os.path.join(os.path.dirname(__file__), 'info.json'))
except Exception as e: except Exception as e:
logger.error('Exception:%s', e) logger.error('Exception:%s', e)

View File

@@ -112,7 +112,8 @@ def ajax(sub):
# UI 요청 # UI 요청
elif sub == 'ffmpeg_version': elif sub == 'ffmpeg_version':
path = request.form['path'] path = request.form['path']
ret = subprocess.check_output([path, '-version']).replace('\n', '<br>') ret = subprocess.check_output([path, '-version'])
ret = ret.decode().replace('\n', '<br>')
return jsonify(ret) return jsonify(ret)
elif sub == 'download': elif sub == 'download':