PeterDing / BaiduPCS-Py

BaiduPCS API & App 百度网盘客户端 和 API
MIT License
698 stars 113 forks source link

上传中按Ctrl-C中断,终端回显设置未复原(Linux) #31

Closed AlexGuo1998 closed 3 years ago

AlexGuo1998 commented 3 years ago

Describe the bug / 描述 bug 上传中按 Ctrl-C 中断,终端回显功能被关闭,导致终端无法正常使用

To Reproduce / 复现问题

$ stty
speed 38400 baud; line = 0;
-brkint -imaxbel iutf8

$ BaiduPCS-Py u test.mp4 /

⠹ test.mp4 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0% • 0.0/3.5 GB • ? • -:--:--

^c # 按 Ctrl-C 中断上传

$ stty # <- 这几个字并没有在屏幕上显示出来
speed 38400 baud; line = 0;
min = 1; time = 0;
-brkint -imaxbel iutf8
-icanon -echo

-echo表示终端回显功能被关闭,此时在终端输入任何内容都无法显示,但可以回车执行。如果需要恢复终端回显:

stty echo

Screenshots / 问题截图 N/A

Envrionment / 运行环境

Runing log / 运行日志

2021-03-22 22:18:15,187 | DEBUG | upload: ======== Uploading start ========
-> Size of from_to_list: 0
2021-03-22 22:18:15,190 | DEBUG | upload: ======== Uploading end ========
2021-03-22 22:20:08,960 | DEBUG | upload: ======== Uploading start ========
-> Size of from_to_list: 1
2021-03-22 22:20:09,048 | DEBUG | upload: -> Upload: index: 0, task_id: 0
2021-03-22 22:20:10,704 | DEBUG | upload: `upload`: encrypt_type: EncryptType.No, localpath: test.mp4, remotepath, /test.mp4
2021-03-22 22:20:10,705 | DEBUG | upload: `upload`: encrypt_io_len: 3456805873
2021-03-22 22:20:10,705 | DEBUG | upload: `upload`: rapid_upload starts
2021-03-22 22:20:13,006 | DEBUG | app: `app`: handle_signal: 2

Additional context / 补充内容 N/A

PeterDing commented 3 years ago

已经在 v0.6.15 中修复。

PeterDing commented 3 years ago

应该没有问题了

AlexGuo1998 commented 3 years ago

好的谢谢!最近没有时间测试