- Resolve the issue of
SSHCommandError
exception not being properly handled. #1 - Fix the issue where the output would include automatically appended commands when a command failed (the "automatically appended command" is the solution used to determine the success of the current command). #2
- Improve the optional parameter
auto_sudo
(whether to automatically prepend thesudo
command to the command) by only applying it when the remote user is not theroot
user (thesudo
command will only be added to the command if the remote user is not root). #3 - Improve the
SSHCommandError
exception class by changing its inheritance fromException
toparamiko.SSHException
. - Refactor (improve) the method of obtaining version information in the
setup
by directly extracting it frompackage.__doc__
instead of opening a file. - Make some other small optimizations.
- Adjust the open-source library category information on PyPi.
- Update the README file.
1.解决 SSHCommandError
异常无法被妥善处理的问题。#1
2.修复当命令异常时输出中会包含自动追加的命令的问题(“自动追加的命令” 是用于判断当前命令是否执行成功的方案)。#2
3.改进可选参数 auto_sudo
(是否在命令前自动添加 sudo
指令),只有当远程用户不是 root
用户时该参数才会生效(才会在命令前添加 sudo
指令)。#3
4.改进 SSHCommandError
异常类,从继承 Exception
改为继承 paramiko.SSHException
。
5.重构(改进) setup
中获得版本信息的方案,直接从 package.__doc__
中提取,而不再打开文件。
6.其它一些小的优化。
7.调整在PyPi上的开源库分类信息。
8.更新自述文件。