right strip response end of line
This commit is contained in:
@@ -67,7 +67,7 @@ def main() -> int:
|
|||||||
while run.running:
|
while run.running:
|
||||||
try:
|
try:
|
||||||
send(port, UPS_COMMAND)
|
send(port, UPS_COMMAND)
|
||||||
raw_data = receive(port, UPS_COMMAND).lstrip('(').split()
|
raw_data = receive(port, UPS_COMMAND).lstrip('(').rstrip().split()
|
||||||
if len(raw_data) < 8:
|
if len(raw_data) < 8:
|
||||||
LOGGER.error(f"Incomplete data: {raw_data}")
|
LOGGER.error(f"Incomplete data: {raw_data}")
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user