namespace issue fixed!
This commit is contained in:
parent
27978786b8
commit
46351329b8
@ -3,6 +3,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
from . import constants_fallback as constants
|
from . import constants_fallback as constants
|
||||||
|
|
||||||
|
from . import utils
|
||||||
from . import disk
|
from . import disk
|
||||||
from . import system
|
from . import system
|
||||||
from . import config
|
from . import config
|
||||||
@ -10,9 +11,6 @@ from . import envsetup
|
|||||||
from . import log
|
from . import log
|
||||||
from . import network
|
from . import network
|
||||||
from . import pacman
|
from . import pacman
|
||||||
from . import utils
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class AIF(object):
|
class AIF(object):
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
from .constants_fallback import *
|
from .constants_fallback import *
|
||||||
##
|
##
|
||||||
import aif.disk._common
|
# This creates a conflict of imports, unfortunately.
|
||||||
_BlockDev = aif.disk._common.BlockDev
|
# So we end up doing the same thing in aif/disk/(__init__.py => _common.py)... C'est la vie.
|
||||||
aif.disk._common.addBDPlugin('part')
|
# Patches welcome.
|
||||||
|
# import aif.disk._common
|
||||||
|
# _BlockDev = aif.disk._common.BlockDev
|
||||||
|
# aif.disk._common.addBDPlugin('part')
|
||||||
|
import gi
|
||||||
|
gi.require_version('BlockDev', '2.0')
|
||||||
|
from gi.repository import BlockDev as _BlockDev
|
||||||
|
from gi.repository import GLib
|
||||||
|
_BlockDev.ensure_init(_BlockDev.plugin_specs_from_names(('part', )))
|
||||||
|
|
||||||
|
|
||||||
# LIBBLOCKDEV FLAG INDEXING / PARTED <=> LIBBLOCKDEV FLAG CONVERSION
|
# LIBBLOCKDEV FLAG INDEXING / PARTED <=> LIBBLOCKDEV FLAG CONVERSION
|
||||||
|
@ -1,28 +1,29 @@
|
|||||||
try:
|
|
||||||
from . import block
|
|
||||||
except ImportError:
|
|
||||||
from . import block_fallback as block
|
|
||||||
try:
|
|
||||||
from . import filesystem_fallback
|
|
||||||
except ImportError:
|
|
||||||
from . import filesystem_fallback as filesystem
|
|
||||||
|
|
||||||
try:
|
|
||||||
from . import luks_fallback
|
|
||||||
except ImportError:
|
|
||||||
from . import luks_fallback as luks
|
|
||||||
|
|
||||||
try:
|
|
||||||
from . import lvm_fallback
|
|
||||||
except ImportError:
|
|
||||||
from . import lvm_fallback as lvm
|
|
||||||
|
|
||||||
try:
|
|
||||||
from . import mdadm_fallback
|
|
||||||
except ImportError:
|
|
||||||
from . import mdadm_fallback as mdadm
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from . import _common
|
from . import _common
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass # GI isn't supported, so we don't even use a fallback.
|
pass # GI isn't supported, so we don't even use a fallback.
|
||||||
|
|
||||||
|
try:
|
||||||
|
from . import block
|
||||||
|
except ImportError:
|
||||||
|
from . import block_fallback as block
|
||||||
|
|
||||||
|
try:
|
||||||
|
from . import filesystem
|
||||||
|
except ImportError:
|
||||||
|
from . import filesystem_fallback as filesystem
|
||||||
|
|
||||||
|
try:
|
||||||
|
from . import luks
|
||||||
|
except ImportError:
|
||||||
|
from . import luks_fallback as luks
|
||||||
|
|
||||||
|
try:
|
||||||
|
from . import lvm
|
||||||
|
except ImportError:
|
||||||
|
from . import lvm_fallback as lvm
|
||||||
|
|
||||||
|
try:
|
||||||
|
from . import mdadm
|
||||||
|
except ImportError:
|
||||||
|
from . import mdadm_fallback as mdadm
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import re
|
import re
|
||||||
##
|
##
|
||||||
import parted
|
import parted # Do I need this if I can have libblockdev's mounts API? Is there a way to get current mounts?
|
||||||
import psutil
|
import psutil
|
||||||
##
|
##
|
||||||
import aif.constants
|
import aif.constants
|
||||||
import aif.disk._common
|
|
||||||
import aif.utils
|
import aif.utils
|
||||||
|
from . import _common
|
||||||
|
|
||||||
_BlockDev = aif.disk._common.BlockDev
|
|
||||||
|
_BlockDev = _common.BlockDev
|
||||||
|
|
||||||
|
|
||||||
class Partition(object):
|
class Partition(object):
|
||||||
|
Loading…
Reference in New Issue
Block a user