Skip to content

Commit

Permalink
Fixed type error for protocol class
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Nov 20, 2024
1 parent e44b134 commit ec7117e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ class DbOsExecutor(Protocol):
concrete implementations in sub-classes ``DockerExecutor`` and
``SshExecutor``.
"""
@abstractmethod
def exec(self, cmd: str) -> ExecResult:
...

def prepare(self):
pass
...


class DockerExecutor(DbOsExecutor):
Expand All @@ -65,6 +64,9 @@ def exec(self, cmd: str) -> ExecResult:
assert self._container
return self._container.exec_run(cmd)

def prepare(self):
pass

def close(self):
self._container = None
if self._client is not None:
Expand Down Expand Up @@ -145,6 +147,7 @@ def executor(self) -> DbOsExecutor:
return DockerExecutor(client, self._container_name)



class SshExecFactory(DbOsExecFactory):
@classmethod
def from_database_info(cls, info: DatabaseInfo):
Expand Down

0 comments on commit ec7117e

Please sign in to comment.