making a LOT of headway on the gi stuff but hitting a namespace issue
This commit is contained in:
@@ -2,8 +2,12 @@ import gi
|
||||
gi.require_version('BlockDev', '2.0')
|
||||
from gi.repository import BlockDev, GLib
|
||||
|
||||
ps = BlockDev.PluginSpec()
|
||||
ps.name = BlockDev.Plugin.LVM
|
||||
ps.so_name = "libbd_lvm.so"
|
||||
BlockDev.ensure_init([None])
|
||||
|
||||
BlockDev.init([ps])
|
||||
|
||||
def addBDPlugin(plugin_name):
|
||||
plugins = BlockDev.get_available_plugin_names()
|
||||
plugins.append(plugin_name)
|
||||
plugins = list(set(plugins)) # Deduplicate
|
||||
spec = BlockDev.plugin_specs_from_names(plugins)
|
||||
return(BlockDev.ensure_init(spec))
|
||||
|
||||
Reference in New Issue
Block a user