From d07e718ab8ab67e991c4a820e7ad32cf0b05fd4f Mon Sep 17 00:00:00 2001 From: Flame442 <34169552+Flame442@users.noreply.github.com> Date: Mon, 2 Dec 2019 11:41:28 -0500 Subject: [PATCH] Fixes errors on repo add from empty string values for `install_msg` (#3153) * Fixes errors on repo add from empty string values for `install_msg` * Create 3153.bugfix.rst --- changelog.d/downloader/3153.bugfix.rst | 1 + redbot/cogs/downloader/downloader.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/downloader/3153.bugfix.rst diff --git a/changelog.d/downloader/3153.bugfix.rst b/changelog.d/downloader/3153.bugfix.rst new file mode 100644 index 000000000..fd8d74945 --- /dev/null +++ b/changelog.d/downloader/3153.bugfix.rst @@ -0,0 +1 @@ +Fixed an error on repo add from empty string values for the `install_msg` info.json field. diff --git a/redbot/cogs/downloader/downloader.py b/redbot/cogs/downloader/downloader.py index b12ac7ae2..094f33f3e 100644 --- a/redbot/cogs/downloader/downloader.py +++ b/redbot/cogs/downloader/downloader.py @@ -462,7 +462,7 @@ class Downloader(commands.Cog): ) else: await ctx.send(_("Repo `{name}` successfully added.").format(name=name)) - if repo.install_msg is not None: + if repo.install_msg: await ctx.send(repo.install_msg.replace("[p]", ctx.prefix)) @repo.command(name="delete", aliases=["remove", "del"], usage="")