[anaconda 3/6] Ignore safe_dbus errors in keyboard setup
Vratislav Podzimek
vpodzime at redhat.com
Thu Aug 7 07:26:34 UTC 2014
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.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list