mirror of
https://github.com/yavook/kiwi-scp.git
synced 2024-11-21 20:33:00 +00:00
"shell" -> "sh", redundant SUBCOMMANDS array
This commit is contained in:
parent
a471ac4f51
commit
156318295f
3 changed files with 6 additions and 17 deletions
|
@ -2,21 +2,9 @@
|
|||
import logging
|
||||
|
||||
# local
|
||||
from . import subcommands
|
||||
from .config import LoadedConfig
|
||||
from .parser import Parser
|
||||
from .subcommands import *
|
||||
|
||||
###########
|
||||
# CONSTANTS
|
||||
|
||||
# all available subcommands
|
||||
SUBCOMMANDS = [
|
||||
InitCommand,
|
||||
ShowCommand,
|
||||
LogsCommand,
|
||||
CmdCommand,
|
||||
ShellCommand
|
||||
]
|
||||
|
||||
|
||||
class Runner:
|
||||
|
@ -30,7 +18,8 @@ class Runner:
|
|||
|
||||
def __init__(self):
|
||||
# setup all subcommands
|
||||
for cmd in SUBCOMMANDS:
|
||||
for className in subcommands.__all__:
|
||||
cmd = getattr(subcommands, className)
|
||||
self.__commands.append(cmd())
|
||||
|
||||
def run(self):
|
||||
|
|
|
@ -3,12 +3,12 @@ from .init import InitCommand
|
|||
from .logs import LogsCommand
|
||||
from .show import ShowCommand
|
||||
from .cmd import CmdCommand
|
||||
from .shell import ShellCommand
|
||||
from .sh import ShCommand
|
||||
|
||||
__all__ = [
|
||||
'InitCommand',
|
||||
'LogsCommand',
|
||||
'ShowCommand',
|
||||
'CmdCommand',
|
||||
'ShellCommand'
|
||||
'ShCommand'
|
||||
]
|
||||
|
|
|
@ -22,7 +22,7 @@ def _service_has_shell(config, args, compose_cmd, shell):
|
|||
return False
|
||||
|
||||
|
||||
class ShellCommand(ServiceCommand):
|
||||
class ShCommand(ServiceCommand):
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
'sh',
|
Loading…
Reference in a new issue