mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-28 21:54:34 +02:00
lib.base: Add module
Add lib.base to provide basic definitions. For now, move the definiions of Result, Input and InputMode from ExecContext into lib.base. Having to import them from the ExecContect module is too heavy-handed for those simple types. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
04fef1e67a
commit
888c0495ec
17 changed files with 50 additions and 38 deletions
|
|
@ -3,7 +3,7 @@
|
|||
import os, sys, subprocess, asyncio
|
||||
|
||||
from ..ExecContext import ExecContext as Base
|
||||
from ..ExecContext import Result
|
||||
from ..base import Result
|
||||
|
||||
from ..log import *
|
||||
from ..util import pretty_cmd
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ from enum import Flag, auto
|
|||
|
||||
from ..util import pretty_cmd
|
||||
from ..log import *
|
||||
from ..ExecContext import ExecContext, Result
|
||||
from ..base import Result
|
||||
from ..ExecContext import ExecContext
|
||||
from urllib.parse import urlparse
|
||||
|
||||
class SSHClient(ExecContext):
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
import os, sys, shlex, asyncio, asyncssh, shutil, signal
|
||||
|
||||
from ...log import *
|
||||
from ...ExecContext import Result
|
||||
from ...base import Result
|
||||
from ..SSHClient import SSHClient as Base
|
||||
|
||||
from .util import join_cmd
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from ..SSHClient import SSHClient as Base
|
|||
from .util import join_cmd
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ...ExecContext import Result
|
||||
from ...base import Result
|
||||
|
||||
class Exec(Base):
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
|
|||
import paramiko # type: ignore # error: Library stubs not installed for "paramiko"
|
||||
|
||||
from ...log import *
|
||||
from ...ExecContext import Result
|
||||
from ...base import Result
|
||||
from ..SSHClient import SSHClient as Base
|
||||
|
||||
from .util import join_cmd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue