[firstboot][PATCH] Don't panic if there are no modules found (#1026941)
Vratislav Podzimek
vpodzime at redhat.com
Wed Nov 6 10:09:07 UTC 2013
If there are no modules found, we should just skip running the UI session and
exit silently.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
progs/firstboot | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/progs/firstboot b/progs/firstboot
index 1ad7e31..59d3484 100755
--- a/progs/firstboot
+++ b/progs/firstboot
@@ -121,19 +121,16 @@ if __name__ == '__main__':
modules = loader.load_modules(module_dir=opts.module_dir,
reconfig=opts.reconfig)
- if not modules:
- err = 'no modules found'
- raise RuntimeError(err)
-
- # TODO rewrite the interface
- config.interface.moduleList = modules
- config.interface.createMainWindow()
- config.interface.createScreens()
- config.interface.createSidebar()
- config.interface.run()
-
- if frontend is not None:
- frontend.kill()
+ if modules:
+ # TODO rewrite the interface
+ config.interface.moduleList = modules
+ config.interface.createMainWindow()
+ config.interface.createScreens()
+ config.interface.createSidebar()
+ config.interface.run()
+
+ if frontend is not None:
+ frontend.kill()
if not opts.test:
with open('/etc/sysconfig/firstboot', 'w') as f:
--
1.8.3.1
More information about the anaconda-patches
mailing list