fake persistent_details in dry-run mode

This commit is contained in:
Michael Hudson-Doyle 2019-11-07 16:35:14 +13:00
parent d550bb139d
commit b5ea14f4f1
2 changed files with 7 additions and 2 deletions

View File

@ -64,7 +64,7 @@ class ErrorReport(metaclass=urwid.MetaSignals):
@classmethod
def new(cls, controller, kind):
base = "installer.{:.9f}.{}".format(time.time(), kind.name.lower())
base = "{:.9f}.{}".format(time.time(), kind.name.lower())
crash_file = open(
os.path.join(controller.crash_directory, base + ".crash"),
'wb')
@ -204,6 +204,11 @@ class ErrorReport(metaclass=urwid.MetaSignals):
root = parts[3]
break
else:
if self.controller.opts.dry_run:
path = ('install-logs/2019-11-06.0/crash/' +
self.base +
'.crash')
return "casper-rw", path
return None, None
import pyudev
c = pyudev.Context()

View File

@ -181,7 +181,7 @@ class ErrorReportStretchy(Stretchy):
widgets.extend([Text(""), self.btns[b]])
else:
widgets.extend([
Text(),
Text(""),
self.btns['close'],
])