[master/rhel7-branch] Force reboot the system on cmdline error. (#1034773)

Vratislav Podzimek vpodzime at redhat.com
Tue Feb 25 10:00:09 UTC 2014


On Tue, 2014-02-25 at 04:45 -0500, Samantha N. Bueno wrote:
> On Tue, Feb 25, 2014 at 09:58:28AM +0100, Vratislav Podzimek wrote:
> > On Mon, 2014-02-24 at 10:16 -0500, Samantha N. Bueno wrote:
> > > A system would not reboot under all cases where a CmdlineError was
> > > raised, so just force it this way.
> > > 
> > > Resolves: rhbz#1034773
> > > ---
> > >  pyanaconda/exception.py | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
> > > index 13f5ba9..c7ab659 100644
> > > --- a/pyanaconda/exception.py
> > > +++ b/pyanaconda/exception.py
> > > @@ -107,7 +107,7 @@ class AnacondaExceptionHandler(ExceptionHandler):
> > >              # for a few seconds before exiting the installer
> > >              print(cmdline_error_msg)
> > >              time.sleep(180)
> > > -            sys.exit(0)
> > > +            os.system("reboot")
> > Is our exitHandler called at some point, if we do something like this?
> > I'm afraid it isn't.
> 
> Ahh, thank you. I was puzzled by that, hence my rather brute force
> option. :P
> 
> > Maybe we could make sys.exit(0) work in all cases?
> > Or should we send SIGTERM to ourselves instead?
> 
> I already pushed this patch (ack'ed in irc); I can possibly amend it and
> push it as Related or just push a new one to master: though, I'm not
> sure which of those options would be more correct.
I think another patch with Related should be the best way to go.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list