Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions archinstall/lib/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down