This commit is contained in:
Jörn-Michael Miehe 2021-09-22 03:06:43 +02:00
parent b9db18b09c
commit 09836743bb
11 changed files with 14 additions and 19 deletions

View file

@ -1,7 +1,6 @@
# system
import os
#############
# ENVIRONMENT
@ -10,7 +9,6 @@ KIWI_ROOT = os.getenv('KIWI_ROOT', ".")
# default name of kiwi-scp file
KIWI_CONF_NAME = os.getenv('KIWI_CONF_NAME', "kiwi.yml")
############
# FILE NAMES
@ -27,7 +25,6 @@ CONF_DIRECTORY_NAME = 'conf'
# location for auxiliary Dockerfiles
IMAGES_DIRECTORY_NAME = f"{KIWI_ROOT}/images"
####################
# DOCKER IMAGE NAMES

View file

@ -1,6 +1,6 @@
def _surround(string, bang):
midlane = f"{bang * 3} {string} {bang * 3}"
sidelane = bang*len(midlane)
sidelane = bang * len(midlane)
return f"{sidelane}\n{midlane}\n{sidelane}"

View file

@ -1,10 +1,9 @@
import logging
import os
from .executable import Executable
from ._constants import CONF_DIRECTORY_NAME
from .config import LoadedConfig
from .executable import Executable
class Project:

View file

@ -4,11 +4,11 @@ import subprocess
# local
from .._constants import CONF_DIRECTORY_NAME
from ..executable import Executable
from ..subcommand import SubCommand
from ..config import LoadedConfig
from ..executable import Executable
from ..projects import Projects
from ..rootkit import Rootkit, prefix_path_mnt
from ..subcommand import SubCommand
class ConfCopyCommand(SubCommand):

View file

@ -4,10 +4,10 @@ import subprocess
# local
from ._hidden import _find_net
from ..subcommand import ServiceCommand
from ..config import LoadedConfig
from ..executable import Executable
from ..misc import are_you_sure
from ..subcommand import ServiceCommand
class DownCommand(ServiceCommand):

View file

@ -4,8 +4,8 @@ import os
# local
from .._constants import KIWI_CONF_NAME
from ..subcommand import SubCommand
from ..config import DefaultConfig, LoadedConfig
from ..subcommand import SubCommand
class InitCommand(SubCommand):
@ -42,7 +42,6 @@ class InitCommand(SubCommand):
# check force switch
if args.force and os.path.isfile(KIWI_CONF_NAME):
logging.warning(f"Overwriting existing '{KIWI_CONF_NAME}'!")
config = DefaultConfig.get()

View file

@ -4,10 +4,10 @@ import subprocess
# local
from ._hidden import _find_net
from ..subcommand import SubCommand
from ..config import LoadedConfig
from ..executable import Executable
from ..misc import are_you_sure
from ..subcommand import SubCommand
class PurgeCommand(SubCommand):

View file

@ -1,6 +1,6 @@
# local
from ..subcommand import ServiceCommand
from ..misc import are_you_sure
from ..subcommand import ServiceCommand
class RestartCommand(ServiceCommand):

View file

@ -2,9 +2,9 @@
import logging
import subprocess
from ..config import LoadedConfig
# local
from ..subcommand import ServiceCommand
from ..config import LoadedConfig
def _service_has_executable(project, service, exe_name):
@ -52,7 +52,7 @@ def _find_shell(args, project, service):
elif i + 1 < len(shells):
# try next in list
logging.info(f"Shell '{shell}' not found in container, trying '{shells[i+1]}'")
logging.info(f"Shell '{shell}' not found in container, trying '{shells[i + 1]}'")
elif args.shell:
# not found, user suggestion provided

View file

@ -3,10 +3,10 @@ import logging
import os
import yaml
# local
from ..subcommand import ServiceCommand
from ..project import Project
from ..projects import Projects
# local
from ..subcommand import ServiceCommand
def _print_list(strings):

View file

@ -1,6 +1,6 @@
# local
from ..subcommand import ServiceCommand
from ..misc import are_you_sure
from ..subcommand import ServiceCommand
class UpdateCommand(ServiceCommand):