hide sudo warning from user

This commit is contained in:
Sagar Karandikar 2022-10-15 20:45:48 -07:00
parent 186fb02cf9
commit c55dcc9836
1 changed files with 2 additions and 2 deletions

View File

@ -7,14 +7,14 @@ import logging
from os import fspath from os import fspath
from os.path import realpath from os.path import realpath
from pathlib import Path from pathlib import Path
from fabric.api import run, warn_only # type: ignore from fabric.api import run, warn_only, hide # type: ignore
from typing import List, Tuple, Type from typing import List, Tuple, Type
rootLogger = logging.getLogger() rootLogger = logging.getLogger()
def has_sudo() -> bool: def has_sudo() -> bool:
with warn_only(): with warn_only(), hide('warnings'):
return run("sudo -ln true").return_code == 0 return run("sudo -ln true").return_code == 0
def get_local_shared_libraries(elf: str) -> List[Tuple[str, str]]: def get_local_shared_libraries(elf: str) -> List[Tuple[str, str]]: