namespace issue fixed!
This commit is contained in:
parent
27978786b8
commit
46351329b8
@ -3,6 +3,7 @@ try:
|
||||
except ImportError:
|
||||
from . import constants_fallback as constants
|
||||
|
||||
from . import utils
|
||||
from . import disk
|
||||
from . import system
|
||||
from . import config
|
||||
@ -10,9 +11,6 @@ from . import envsetup
|
||||
from . import log
|
||||
from . import network
|
||||
from . import pacman
|
||||
from . import utils
|
||||
|
||||
|
||||
|
||||
|
||||
class AIF(object):
|
||||
|
@ -1,8 +1,16 @@
|
||||
from .constants_fallback import *
|
||||
##
|
||||
import aif.disk._common
|
||||
_BlockDev = aif.disk._common.BlockDev
|
||||
aif.disk._common.addBDPlugin('part')
|
||||
# This creates a conflict of imports, unfortunately.
|
||||
# So we end up doing the same thing in aif/disk/(__init__.py => _common.py)... C'est la vie.
|
||||
# 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
|
||||
|
@ -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:
|
||||
from . import _common
|
||||
except ImportError:
|
||||
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 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 aif.constants
|
||||
import aif.disk._common
|
||||
import aif.utils
|
||||
from . import _common
|
||||
|
||||
_BlockDev = aif.disk._common.BlockDev
|
||||
|
||||
_BlockDev = _common.BlockDev
|
||||
|
||||
|
||||
class Partition(object):
|
||||
|
Loading…
Reference in New Issue
Block a user