Skip to content

Commit ff6777b

Browse files
committed
Remove unused context manager code from SysCommand
1 parent 55fd59d commit ff6777b

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

archinstall/lib/general.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,6 @@ def __init__(
324324
self.session: SysCommandWorker | None = None
325325
self.create_session()
326326

327-
def __enter__(self) -> SysCommandWorker | None:
328-
return self.session
329-
330-
def __exit__(self, *args: str, **kwargs: dict[str, Any]) -> None:
331-
# b''.join(sys_command('sync')) # No need to, since the underlying fs() object will call sync.
332-
# TODO: https://stackoverflow.com/questions/28157929/how-to-safely-handle-an-exception-inside-a-context-manager
333-
334-
if len(args) >= 2 and args[1]:
335-
error(args[1])
336-
337327
def __iter__(self, *args: list[Any], **kwargs: dict[str, Any]) -> Iterator[bytes]:
338328
if self.session:
339329
yield from self.session

0 commit comments

Comments
 (0)