Skip to content

Commit ce48057

Browse files
committed
[datatransfer,protocoltest] updated expected exceptions
1 parent 3332d9d commit ce48057

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/instrumentman/datatransfer/app.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from io import BufferedWriter, TextIOWrapper
22
from logging import getLogger
33

4-
from serial import SerialTimeoutException
54
from rich.progress import Progress, TextColumn, BarColumn, TimeElapsedColumn
65
from geocompy.communication import open_serial
76

@@ -92,7 +91,7 @@ def main_download(
9291
total=lines
9392
)
9493
break
95-
except SerialTimeoutException:
94+
except TimeoutError:
9695
if started and autoclose:
9796
logger.info("Download finished (timeout)")
9897
print_success("Download finished due to timeout")

src/instrumentman/protocoltest/app.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from rich.live import Live
66
from rich.table import Table, Column
77
from rich.prompt import Confirm
8-
from serial import SerialException
98
from geocompy.data import Angle
109
from geocompy.geo import GeoCom
1110
from geocompy.geo.gcdata import Device
@@ -177,6 +176,6 @@ def main(
177176
"An exception occured while running the tests"
178177
)
179178

180-
except (SerialException, ConnectionError) as e:
179+
except (ConnectionRefusedError, ConnectionError) as e:
181180
print_error(f"Connection was not successful ({e})")
182181
logger.exception("Connection was not successful")

0 commit comments

Comments
 (0)