[rhinstaller/blivet/pulls/127 master] Adapt to the new libblockdev initialization API
vpodzime
installerbot-noreply at redhat.com
Wed May 27 06:14:15 UTC 2015
> @@ -67,20 +67,13 @@ def cb(self, exn):
> from gi.repository import BlockDev as blockdev
> _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm"))
> _requested_plugins = blockdev.plugin_specs_from_names(_REQUESTED_PLUGIN_NAMES)
> -if not blockdev.is_initialized():
> - try:
> - blockdev.try_init(require_plugins=_requested_plugins, log_func=log_bd_message)
> - except GLib.GError:
> - pass
> +try:
> + succ, avail_plugs = blockdev.try_reinit(require_plugins=_requested_plugins, reload=False, log_func=log_bd_message)
Good catch, thanks! I originally meant to use it to skip the set operations and checks, but I think it's clearer to just compare the sets. Fixing.
--
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/127#discussion_r31105784
More information about the anaconda-patches
mailing list