From c117a80c1ea381ad746d216d2501c7abd6766868 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 29 Aug 2019 20:24:41 +0200 Subject: [PATCH] Change import in stack_pref.py --- wo/cli/plugins/stack.py | 14 +++++--------- wo/cli/plugins/stack_pref.py | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index de05852..eafdc5e 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -92,7 +92,7 @@ class WOStackController(CementBaseController): (['--utils'], dict(help='Install Utils stack', action='store_true')), (['--cheat'], - dict(help='Install cht.sh stack', action='store_true')), + dict(help='Install cheat.sh stack', action='store_true')), (['--redis'], dict(help='Install Redis', action='store_true')), (['--phpredisadmin'], @@ -459,15 +459,11 @@ class WOStackController(CementBaseController): '/var/lib/wo/tmp/anemometer.tar.gz', 'Anemometer']] if pargs.cheat: - if ((not os.path.isfile('/usr/local/bin/cht.sh')) and - (not os.path.isfile('/usr/bin/cht.sh'))): + if not os.path.isfile('/usr/local/bin/cht.sh'): Log.debug(self, "Setting packages variable for cht.sh") - WOShellExec.cmd_exec( - self, "/usr/bin/curl https://cht.sh/:cht.sh " - "| sudo tee /usr/local/bin/cht.sh") - WOShellExec(self, "/usr/bin/curl " - "https://cheat.sh/:bash_completion | " - "sudo tee /etc/bash_completion.d/cht.sh") + packages = packages + [["https://cht.sh/:cht.sh", + "/usr/local/bin/cht.sh", + "cheat.sh"]] else: Log.debug(self, "cheat.sh is already installed") Log.info(self, "cheat.sh is already installed") diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index bf1e816..50300aa 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -7,7 +7,7 @@ import string import psutil import requests -from wo.cli.plugins.site_functions import * +from wo.cli.plugins.site_functions import SiteError from wo.cli.plugins.stack_services import WOStackStatusController from wo.core.apt_repo import WORepo from wo.core.aptget import WOAptGet