From 0d4bf8a4f29ec3505228e5c45327cbe42608f397 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 29 Jul 2019 04:10:47 +0200 Subject: [PATCH] Remove uneeded import --- wo/cli/plugins/site.py | 4 ---- wo/cli/plugins/sitedb.py | 3 +-- wo/cli/plugins/stack.py | 2 -- wo/cli/plugins/stack_migrate.py | 1 - wo/cli/plugins/stack_upgrade.py | 1 + wo/core/addswap.py | 1 - wo/core/aptget.py | 1 - wo/core/checkfqdn.py | 1 - wo/core/fileutils.py | 3 --- wo/core/mysql.py | 2 -- wo/core/services.py | 4 +--- wo/core/shellexec.py | 2 -- 12 files changed, 3 insertions(+), 22 deletions(-) diff --git a/wo/cli/plugins/site.py b/wo/cli/plugins/site.py index 26a0111..4d0f39a 100644 --- a/wo/cli/plugins/site.py +++ b/wo/cli/plugins/site.py @@ -1,7 +1,6 @@ # """WordOps site controller.""" from cement.core.controller import CementBaseController, expose from cement.core import handler, hook -from wo.core.cron import WOCron from wo.core.sslutils import SSL from wo.core.variables import WOVariables from wo.core.shellexec import WOShellExec @@ -1219,7 +1218,6 @@ class WOSiteUpdateController(CementBaseController): if pargs.dns: data['letsencrypt'] = True letsencrypt = True - pargs.letsencrypt == 'wildcard' else: data['letsencrypt'] = True letsencrypt = True @@ -1239,10 +1237,8 @@ class WOSiteUpdateController(CementBaseController): if pargs.hsts: if pargs.hsts == "on": data['hsts'] = True - hsts = True elif pargs.hsts == "off": data['hsts'] = False - hsts = False if not data: Log.error(self, "Cannot update {0}, Invalid Options" diff --git a/wo/cli/plugins/sitedb.py b/wo/cli/plugins/sitedb.py index 4048b26..0a069a1 100644 --- a/wo/cli/plugins/sitedb.py +++ b/wo/cli/plugins/sitedb.py @@ -5,8 +5,7 @@ from sqlalchemy.ext.declarative import declarative_base from wo.core.logging import Log from wo.core.database import db_session from wo.cli.plugins.models import SiteDB -import sys -import glob + def addNewSite(self, site, stype, cache, path, diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index 048daf4..9c52b1c 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -5,9 +5,7 @@ from cement.core.controller import CementBaseController, expose import codecs import configparser -import grp import os -import platform import pwd import random import shutil diff --git a/wo/cli/plugins/stack_migrate.py b/wo/cli/plugins/stack_migrate.py index 38bb394..a81d2b4 100644 --- a/wo/cli/plugins/stack_migrate.py +++ b/wo/cli/plugins/stack_migrate.py @@ -6,7 +6,6 @@ from wo.core.variables import WOVariables from wo.core.aptget import WOAptGet from wo.core.shellexec import WOShellExec from wo.core.apt_repo import WORepo -from wo.core.services import WOService import configparser import os diff --git a/wo/cli/plugins/stack_upgrade.py b/wo/cli/plugins/stack_upgrade.py index 7f3e4f8..4ff5e8c 100644 --- a/wo/cli/plugins/stack_upgrade.py +++ b/wo/cli/plugins/stack_upgrade.py @@ -9,6 +9,7 @@ from wo.core.fileutils import WOFileUtils from wo.core.shellexec import WOShellExec from wo.core.extract import WOExtract from wo.core.download import WODownload +from wo.cli.plugins.stack import WOStackController import configparser import os import shutil diff --git a/wo/core/addswap.py b/wo/core/addswap.py index 02df054..ad0c14c 100644 --- a/wo/core/addswap.py +++ b/wo/core/addswap.py @@ -1,5 +1,4 @@ """WordOps Swap Creation""" -from wo.core.variables import WOVariables from wo.core.shellexec import WOShellExec from wo.core.fileutils import WOFileUtils from wo.core.aptget import WOAptGet diff --git a/wo/core/aptget.py b/wo/core/aptget.py index 75e0e11..39b391a 100644 --- a/wo/core/aptget.py +++ b/wo/core/aptget.py @@ -1,6 +1,5 @@ """WordOps package installation using apt-get module.""" import apt -import apt_pkg import sys import subprocess from wo.core.logging import Log diff --git a/wo/core/checkfqdn.py b/wo/core/checkfqdn.py index 9add740..636c211 100644 --- a/wo/core/checkfqdn.py +++ b/wo/core/checkfqdn.py @@ -1,6 +1,5 @@ from wo.core.shellexec import WOShellExec from wo.core.variables import WOVariables -import os def check_fqdn(self, wo_host): diff --git a/wo/core/fileutils.py b/wo/core/fileutils.py index a7a4c29..efc13c6 100644 --- a/wo/core/fileutils.py +++ b/wo/core/fileutils.py @@ -1,9 +1,6 @@ """WordOps file utils core classes.""" import shutil import os -import sys -import glob -import shutil import pwd import fileinput from wo.core.logging import Log diff --git a/wo/core/mysql.py b/wo/core/mysql.py index c289405..e168e85 100644 --- a/wo/core/mysql.py +++ b/wo/core/mysql.py @@ -1,9 +1,7 @@ """WordOps MySQL core classes.""" import pymysql from pymysql import connections, DatabaseError, Error -import configparser from os.path import expanduser -import sys import os from wo.core.logging import Log from wo.core.variables import WOVariables diff --git a/wo/core/services.py b/wo/core/services.py index a6e4c04..e47aca1 100644 --- a/wo/core/services.py +++ b/wo/core/services.py @@ -1,10 +1,8 @@ """WordOps Service Manager""" -import os -import sys import subprocess from subprocess import Popen from wo.core.logging import Log -import pystache + class WOService(): diff --git a/wo/core/shellexec.py b/wo/core/shellexec.py index 77b3dcf..cfb43e1 100644 --- a/wo/core/shellexec.py +++ b/wo/core/shellexec.py @@ -1,7 +1,5 @@ """WordOps Shell Functions""" from wo.core.logging import Log -import os -import sys import subprocess