mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
improvement: replacing subprocess commands to detected installed CLIs by Python faster native calls (shutil.which)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
from bauh.commons.system import run_cmd, SimpleProcess
|
||||
import shutil
|
||||
|
||||
from bauh.commons.system import SimpleProcess
|
||||
|
||||
|
||||
def is_available() -> bool:
|
||||
return bool(run_cmd('which timeshift', print_error=False))
|
||||
return bool(shutil.which('timeshift'))
|
||||
|
||||
|
||||
def delete_all_snapshots(root_password: str) -> SimpleProcess:
|
||||
|
||||
Reference in New Issue
Block a user