[firstboot][PATCH] Don't panic if there are no modules found (#1026941)

Radek Vykydal rvykydal at redhat.com
Thu Nov 7 12:35:22 UTC 2013


Ack.

On 11/06/2013 11:09 AM, Vratislav Podzimek wrote:
> 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:



More information about the anaconda-patches mailing list