Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CmdCtl.sudo_run_cmd("xxx")方法没有返回值,期望增加返回值 #61

Open
DarkLii opened this issue Apr 19, 2024 · 1 comment
Open

Comments

@DarkLii
Copy link
Contributor

DarkLii commented Apr 19, 2024

@classmethod
def sudo_run_cmd(cls, command, interrupt=True, timeout=25, out_debug_flag=True, command_log=True, password=None):
    if password is None:
        password = conf.PASSWORD
    cls.run_cmd(
        f"echo '{password}' | sudo -S {command}",
        interrupt=interrupt,
        timeout=timeout,
        out_debug_flag=out_debug_flag,
        command_log=command_log
    )
@mikigo
Copy link
Contributor

mikigo commented Apr 21, 2024

没有return,是个Bug,下个版本修复😍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants