Skip to content

Commit ccb8731

Browse files
ndrsnhsLKuemmel
authored andcommitted
add path (openWB#2520)
1 parent ddd00a5 commit ccb8731

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

packages/tools/modbus_finder.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
#!/usr/bin/env python3
2-
import sys
32
import time
43
from typing import Callable
54

65
import pymodbus
76
from pymodbus.constants import Endian
87

9-
from modules.common import modbus
8+
import sys
9+
sys.path.append("/var/www/html/openWB/packages")
10+
11+
try:
12+
from modules.common import modbus
13+
except Exception as e:
14+
print(e)
1015

1116

1217
def try_read(function: Callable, **kwargs) -> str:

packages/tools/modbus_tester.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/usr/bin/env python3
2-
import sys
32
import time
4-
from modules.common import modbus
3+
import sys
4+
sys.path.append("/var/www/html/openWB/packages")
5+
try:
6+
from modules.common import modbus
7+
except Exception as e:
8+
print(e)
9+
510

611
host = sys.argv[1]
712
port = int(sys.argv[2])

0 commit comments

Comments
 (0)