diff options
author | Karel Kočí <cynerd@email.cz> | 2015-08-24 14:39:16 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-08-24 16:18:39 +0200 |
commit | a611965667c44f5db923a48d26e824d094e1a664 (patch) | |
tree | 68dada90a74f537e0008568b6dcb8f0fcc62417b /scripts/exceptions.py | |
parent | 9ca8696a489b5c16a2239213919c9e8b7f8c55d5 (diff) | |
download | linux-conf-perf-a611965667c44f5db923a48d26e824d094e1a664.tar.gz linux-conf-perf-a611965667c44f5db923a48d26e824d094e1a664.tar.bz2 linux-conf-perf-a611965667c44f5db923a48d26e824d094e1a664.zip |
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.
Diffstat (limited to 'scripts/exceptions.py')
-rw-r--r-- | scripts/exceptions.py | 10 |
1 files changed, 9 insertions, 1 deletions
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." |