[anaconda 3/6] Ignore safe_dbus errors in keyboard setup
Brian C. Lane
bcl at redhat.com
Thu Aug 7 18:19:55 UTC 2014
On Thu, Aug 07, 2014 at 09:26:34AM +0200, Vratislav Podzimek wrote:
> On Wed, 2014-08-06 at 12:22 -0700, Brian C. Lane wrote:
> > When running inside a mock environment there is no dbus connection
> > available. Log the errors but return sane defaults so that the
> > installation doesn't crash.
> > ---
> > pyanaconda/keyboard.py | 28 +++++++++++++++++++---------
> > 1 file changed, 19 insertions(+), 9 deletions(-)
> >
> > diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
> > index 6966ef8..f8258e1 100644
> > --- a/pyanaconda/keyboard.py
> > +++ b/pyanaconda/keyboard.py
> > @@ -329,7 +329,11 @@ class LocaledWrapper(object):
> > """
> >
> > def __init__(self):
> > - self._connection = safe_dbus.get_new_system_connection()
> > + try:
> > + self._connection = safe_dbus.get_new_system_connection()
> > + except GLib.Error as e: #pylint: disable=E0712
> > + self._connection = None
> > + log.error("Failed to get safe_dbus connection: %s", e)
> What about making this silent failure happen *only* in image/dir
> installations? I'm worried this as it is has quite a big potential to
> hide DBus errors that are normally critical for the installation.
Will do. Also for the nm.py _get_proxy failure.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list