From ff6777b36d7a8bfd4b74b40e138b34f2cc08c2c5 Mon Sep 17 00:00:00 2001 From: correctmost <134317971+correctmost@users.noreply.github.com> Date: Sat, 31 May 2025 15:11:11 -0400 Subject: [PATCH] Remove unused context manager code from SysCommand --- archinstall/lib/general.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index 056e0133e2..8f34ee5d82 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -324,16 +324,6 @@ def __init__( self.session: SysCommandWorker | None = None self.create_session() - def __enter__(self) -> SysCommandWorker | None: - return self.session - - def __exit__(self, *args: str, **kwargs: dict[str, Any]) -> None: - # b''.join(sys_command('sync')) # No need to, since the underlying fs() object will call sync. - # TODO: https://stackoverflow.com/questions/28157929/how-to-safely-handle-an-exception-inside-a-context-manager - - if len(args) >= 2 and args[1]: - error(args[1]) - def __iter__(self, *args: list[Any], **kwargs: dict[str, Any]) -> Iterator[bytes]: if self.session: yield from self.session