aboutsummaryrefslogtreecommitdiff
path: root/scripts/loop.py
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-05-04 22:47:00 +0200
committerKarel Kočí <cynerd@email.cz>2015-05-04 22:47:00 +0200
commit9a1f3ff8fbff9dd418242eefa7aa69dfd38609c5 (patch)
treea4a6a4275ba17f7820d1c0e2f973250f93a69a27 /scripts/loop.py
parent873c7efe496cfd2398b750a616781a5234ae3c6b (diff)
downloadlinux-conf-perf-9a1f3ff8fbff9dd418242eefa7aa69dfd38609c5.tar.gz
linux-conf-perf-9a1f3ff8fbff9dd418242eefa7aa69dfd38609c5.tar.bz2
linux-conf-perf-9a1f3ff8fbff9dd418242eefa7aa69dfd38609c5.zip
Add some configuration options and clean write_conf
Diffstat (limited to 'scripts/loop.py')
-rwxr-xr-xscripts/loop.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/scripts/loop.py b/scripts/loop.py
index c5111bf..21aabe8 100755
--- a/scripts/loop.py
+++ b/scripts/loop.py
@@ -11,7 +11,7 @@ import initialize
import solution
import kernel
import boot
-from exceptions import MissingFile
+import exceptions
def step():
phs = phase_get()
@@ -47,11 +47,19 @@ def step():
phase_set(7)
elif phs == 7:
phase_message(7)
- kernel.config()
+ try:
+ kernel.config()
+ except exceptions.ConfigurationError:
+ if not conf.ignore_misconfig:
+ print("Configuration mismatch. Exiting.")
+ sys.exit(-2)
phase_set(8)
elif phs == 8:
phase_message(8)
- phase_set(9)
+ if conf.only_config:
+ phase_set(2)
+ else:
+ phase_set(9)
elif phs == 9:
phase_message(9)
kernel.make()
@@ -124,6 +132,12 @@ class mainThread(Thread):
def run(self):
if conf.step_by_step:
step()
+ elif conf.single_loop:
+ while not phase_get() == 2:
+ step()
+ step()
+ while not phase_get() == 2:
+ step()
else:
while not self.term:
step()