diff --git a/sopel_modules/SpiceBot_Update/Update.py b/sopel_modules/SpiceBot_Update/Update.py index 96f3be6..0c741d1 100644 --- a/sopel_modules/SpiceBot_Update/Update.py +++ b/sopel_modules/SpiceBot_Update/Update.py @@ -7,6 +7,7 @@ import sopel.module from sopel.config.types import StaticSection, ValidatedAttribute import os +import pip import spicemanip @@ -67,11 +68,21 @@ def nickname_comand_chanstats(bot, trigger): def spicebot_update(bot, deps="False"): + """ pipcommand = "sudo pip3 install --upgrade" if deps == "False": pipcommand += " --no-deps" pipcommand += " --force-reinstall" pipcommand += " git+" + str(bot.config.SpiceBot_Update.gitrepo) + "@" + str(bot.config.SpiceBot_Update.gitbranch) + """ + + pipcommand = ['install'] + pipcommand.append('--upgrade') + if deps == "False": + pipcommand.append('--no-deps') + pipcommand.append('--force-reinstall') + pipcommand.append("git+" + str(bot.config.SpiceBot_Update.gitrepo) + "@" + str(bot.config.SpiceBot_Update.gitbranch)) + pip.main(pipcommand) bot_logging(bot, 'SpiceBot_Update', "Running `" + pipcommand + "`") for line in os.popen(pipcommand).read().split('\n'):