forked from OERV-BSP/u-boot
test/py: efi_secboot: more fixes against pylint
More fixes against pylint warnings that autopep8 didn't handle in the previous commit. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
This commit is contained in:
committed by
Heinrich Schuchardt
parent
91d2b6216b
commit
d863b307e8
@@ -4,9 +4,8 @@
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import pytest
|
||||
import re
|
||||
from subprocess import call, check_call, check_output, CalledProcessError
|
||||
import pytest
|
||||
from defs import *
|
||||
|
||||
# from test/py/conftest.py
|
||||
@@ -14,8 +13,8 @@ from defs import *
|
||||
|
||||
def tool_is_in_path(tool):
|
||||
for path in os.environ["PATH"].split(os.pathsep):
|
||||
fn = os.path.join(path, tool)
|
||||
if os.path.isfile(fn) and os.access(fn, os.X_OK):
|
||||
full_path = os.path.join(path, tool)
|
||||
if os.path.isfile(full_path) and os.access(full_path, os.X_OK):
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -128,8 +127,8 @@ def efi_boot_env(request, u_boot_config):
|
||||
check_call('sudo umount %s' % loop_dev, shell=True)
|
||||
check_call('sudo losetup -d %s' % loop_dev, shell=True)
|
||||
|
||||
except CalledProcessError as e:
|
||||
pytest.skip('Setup failed: %s' % e.cmd)
|
||||
except CalledProcessError as exception:
|
||||
pytest.skip('Setup failed: %s' % exception.cmd)
|
||||
return
|
||||
else:
|
||||
yield image_path
|
||||
|
||||
Reference in New Issue
Block a user