Re: [firstboot-rhel5] Print an error if we cannot import graphical firstboot (#706074)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 25, 2011 at 09:58:57AM +0200, Martin Gracik wrote:
> If there's only firstboot-tui installed and DISPLAY is set,
> do not traceback when importing firstbootWindow.
> Print an error message stating what's wrong and exit.
> ---
>  src/firstboot |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/src/firstboot b/src/firstboot
> index ac3bf03..f2c49ac 100755
> --- a/src/firstboot
> +++ b/src/firstboot
> @@ -97,8 +97,14 @@ if __name__ == "__main__":
>      # Otherwise, run in text mode if in runlevel 3, or take over rhgb's X
>      # server if running, or start up our own if not.
>      if (not noX and os.environ.has_key("DISPLAY")) or fb.doDebug:
> -        from firstbootWindow import firstbootWindow
> -        firstbootWindow(fb)
> +        try:
> +            from firstbootWindow import firstbootWindow
> +        except ImportError:
> +            print "Cannot run firstboot-tui when DISPLAY is set.  You need to
> +            install firstboot with gui support."
> +            os._exit(0)
> +        else:
> +            firstbootWindow(fb)
>      elif (getRunlevel() == 3 and not fb.forcegui) or noX == True:
>          fb.runTextUI()
>      elif rhgbIsRunning():
> -- 
> 1.7.3.2

Ack.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

Attachment: pgp6MD_GAT7yW.pgp
Description: PGP signature

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux