From 4691bad46b0cc7c4a04ce401ff2c7de93128d717 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Thu, 10 Jun 2021 19:29:10 +0200 Subject: Added wipe support to layout definitions. Also changed default start positions of partitions to 1MiB in. --- archinstall/lib/general.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'archinstall/lib/general.py') diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index 4d3257ba..f0be7972 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -322,6 +322,15 @@ class SysCommand: for line in self.session: yield line + def __getitem__(self, key): + if type(key) is slice: + start = key.start if key.start else 0 + end = key.stop if key.stop else len(self.session._trace_log) + + return self.session._trace_log[start:end] + else: + raise ValueError("SysCommand() doesn't have key & value pairs, only slices, SysCommand('ls')[:10] as an example.") + def __repr__(self, *args, **kwargs): return self.session._trace_log.decode('UTF-8') -- cgit v1.2.3-54-g00ecf