mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmdbusd: Correct imports
This commit is contained in:
parent
756f51eac8
commit
96a0604bd0
@ -11,10 +11,8 @@ import os
|
||||
import multiprocessing
|
||||
import queue
|
||||
import itertools
|
||||
try:
|
||||
from . import path
|
||||
except SystemError:
|
||||
import path
|
||||
|
||||
from lvmdbusd import path
|
||||
|
||||
LVM_CMD = os.getenv('LVM_BINARY', path.LVM_BINARY)
|
||||
|
||||
|
@ -23,18 +23,13 @@ import select
|
||||
import copy
|
||||
|
||||
try:
|
||||
from simplejson.scanner import JSONDecodeError
|
||||
import simplejson as json
|
||||
except ImportError:
|
||||
import json
|
||||
|
||||
|
||||
try:
|
||||
from .cfg import LVM_CMD
|
||||
from .utils import log_debug, log_error
|
||||
except:
|
||||
from cfg import LVM_CMD
|
||||
from utils import log_debug, log_error
|
||||
from lvmdbusd.cfg import LVM_CMD
|
||||
from lvmdbusd.utils import log_debug, log_error
|
||||
|
||||
SHELL_PROMPT = "lvm> "
|
||||
|
||||
|
@ -15,12 +15,8 @@ import pprint as prettyprint
|
||||
import os
|
||||
import sys
|
||||
|
||||
try:
|
||||
from . import cmdhandler
|
||||
from .utils import log_debug, log_error
|
||||
except SystemError:
|
||||
import cmdhandler
|
||||
from utils import log_debug
|
||||
from lvmdbusd import cmdhandler
|
||||
from lvmdbusd.utils import log_debug, log_error
|
||||
|
||||
|
||||
class DataStore(object):
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import lvmdbusd
|
||||
from lvmdbusd import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(lvmdbusd.main())
|
||||
sys.exit(main())
|
||||
|
@ -18,11 +18,8 @@ import datetime
|
||||
import dbus
|
||||
import dbus.service
|
||||
import dbus.mainloop.glib
|
||||
from lvmdbusd import cfg
|
||||
|
||||
try:
|
||||
from . import cfg
|
||||
except SystemError:
|
||||
import cfg
|
||||
|
||||
STDOUT_TTY = os.isatty(sys.stdout.fileno())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user