From 0c04cf92a560cbb18043943c52e9c4f954f2ec02 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 11:32:12 +0000 Subject: [PATCH] refactor: set `check` flag to `True` `subprocess.run` uses a default of `check=False`, which means that a nonzero exit code will be ignored by default, instead of raising an exception. You can ignore this issue if this behaviour is intended. --- cogs/skyloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/skyloader.py b/cogs/skyloader.py index 40def88..a1d9309 100644 --- a/cogs/skyloader.py +++ b/cogs/skyloader.py @@ -50,8 +50,8 @@ async def loadExt(self, ctx, *, url: str = None): "install", "--user", *requirements - ] - ) + ], + check=True) except subprocess.CalledProcessError as error: return await utils.answer(ctx, utils.Langs.getcurrent()['error'].format(error))