From c743925992c42a5c9e23a6da5d6f713aca55aa93 Mon Sep 17 00:00:00 2001 From: dgw Date: Tue, 28 Feb 2023 11:31:50 -0600 Subject: [PATCH] reload: remove `.update` command Sopel's not designed to run directly from a Git working directory any more, so let's not advertise this command that relies upon it. --- sopel/modules/reload.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/sopel/modules/reload.py b/sopel/modules/reload.py index 68ca73a384..c1b0fd084c 100644 --- a/sopel/modules/reload.py +++ b/sopel/modules/reload.py @@ -8,7 +8,6 @@ from __future__ import annotations import logging -import subprocess from sopel import plugin, plugins @@ -56,19 +55,6 @@ def f_reload(bot, trigger): )) -@plugin.nickname_command('update') -@plugin.require_admin -@plugin.output_prefix(PLUGIN_OUTPUT_PREFIX) -def f_update(bot, trigger): - """Pulls the latest versions of all plugins from Git (for use by admins only).""" - proc = subprocess.Popen('/usr/bin/git pull', - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, shell=True) - bot.reply(proc.communicate()[0]) - - f_reload(bot, trigger) - - @plugin.nickname_command("load") @plugin.priority("low") @plugin.thread(False) @@ -119,14 +105,6 @@ def pm_f_reload(bot, trigger): f_reload(bot, trigger) -@plugin.command('update') -@plugin.require_privmsg -@plugin.output_prefix(PLUGIN_OUTPUT_PREFIX) -def pm_f_update(bot, trigger): - """Wrapper for allowing delivery of .update command via PM""" - f_update(bot, trigger) - - @plugin.command("load") @plugin.priority("low") @plugin.thread(False)