Zxce3 / userbot

Subprocess run with ignored non-zero exit PYL-W1510
Bug risk
Minor
a year ago2 years old
Using subprocess.run without explicitly set check is not recommended.
120    try:
121        return importlib.import_module(library_name)
122    except ImportError:
123        completed = subprocess.run(["python3", "-m", "pip", "install", package_name])124        if completed.returncode != 0:
125            raise AssertionError(
126                f"Failed to install library {package_name} (pip exited with code {completed.returncode})"