Skip to content

Commit c2c3a15

Browse files
authored
NAS-140202 / 27.0.0-BETA.1 / Make running non-iscsi tests possible on the same TrueNAS machine (#18407)
iscsi modules are not easy to install automatically. They also make runtest.py crash with no reason.
1 parent d836987 commit c2c3a15

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tests/protocols/iscsi_proto.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
import inspect
33
import socket
44

5-
import iscsi
5+
try:
6+
import iscsi
7+
from pyscsi.pyscsi.scsi import SCSI
8+
from pyscsi.utils import init_device
9+
except ImportError:
10+
print("iscsi module not available")
11+
612
from functions import SRVTarget, get_host_ip
7-
from pyscsi.pyscsi.scsi import SCSI
8-
from pyscsi.utils import init_device
913

1014

1115
def initiator_name_supported():

0 commit comments

Comments
 (0)