1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvmdbusd: cmdhandler.py, fix imports

Use the correct py3 syntax for handling imports.  Also use print instead
of log_debug which in this context will produce no output.
This commit is contained in:
Tony Asleson 2016-11-17 13:57:44 -06:00
parent 19a0bf9df6
commit 3a6c78e22a

View File

@ -15,14 +15,9 @@ import collections
import traceback import traceback
import os import os
try: from lvmdbusd import cfg
from . import cfg from lvmdbusd.utils import pv_dest_ranges, log_debug, log_error
from .utils import pv_dest_ranges, log_debug, log_error from lvmdbusd.lvm_shell_proxy import LVMShellProxy
from .lvm_shell_proxy import LVMShellProxy
except SystemError:
import cfg
from utils import pv_dest_ranges, log_debug, log_error
from lvm_shell_proxy import LVMShellProxy
try: try:
import simplejson as json import simplejson as json
@ -117,6 +112,7 @@ _t_call = call_lvm
def _shell_cfg(): def _shell_cfg():
global _t_call global _t_call
# noinspection PyBroadException
try: try:
lvm_shell = LVMShellProxy() lvm_shell = LVMShellProxy()
_t_call = lvm_shell.call_lvm _t_call = lvm_shell.call_lvm
@ -750,4 +746,4 @@ if __name__ == '__main__':
pv_data = pv_retrieve_with_segs() pv_data = pv_retrieve_with_segs()
for p in pv_data: for p in pv_data:
log_debug(str(p)) print(str(p))