From a611965667c44f5db923a48d26e824d094e1a664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 24 Aug 2015 14:39:16 +0200 Subject: Add boot timeout Boot process should timeout after selected number of seconds if no output is generated. This allows resolving some problems with possible boot stuck. --- scripts/exceptions.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'scripts/exceptions.py') diff --git a/scripts/exceptions.py b/scripts/exceptions.py index 649c235..889dbe6 100644 --- a/scripts/exceptions.py +++ b/scripts/exceptions.py @@ -32,13 +32,21 @@ class NoApplicableConfiguration(Exception): return "No applicable configuration find. All generated configurations were already applied." class ProcessFailed(Exception): - def __init__(self, process, returncode): + def __init__(self, process, returncode, output): self.process = process self.returncode = returncode + self.output = output def __str__(self): return "Process failed: " + str(self.process) + \ " with return code: " + str(self.returncode) +class ProcessTimeout(Exception): + def __init__(self, process, output): + self.process = process + self.output = output + def __str__(self): + return "Process timeout: " + str(self.process) + class DatabaseUninitialized(Exception): def __str__(self): return "Database seems to be uninitialized." -- cgit v1.2.3