1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00

lvmdbusd: Correct imports

This commit is contained in:
Tony Asleson 2016-08-29 14:51:26 -05:00
parent 756f51eac8
commit 96a0604bd0
5 changed files with 9 additions and 23 deletions

View File

@ -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)

View File

@ -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> "

View File

@ -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):

View File

@ -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())

View File

@ -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())