Skip to content

Commit 8e3b7ab

Browse files
committed
integration
1 parent f519842 commit 8e3b7ab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/integration/test_mt5_connection.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@
3535
mt5.shutdown()
3636
success = True
3737
break
38-
except Exception:
38+
except (ConnectionError, ValueError, TypeError) as e:
39+
logger.info(f"Connection error: {e}")
3940
try:
4041
mt5.initialize()
41-
except Exception:
42-
logger.info(f"Attempt {attempt+1}: Not ready yet, sleeping...")
42+
except (ConnectionError, ValueError, TypeError) as e:
43+
logger.info(f"Attempt {attempt+1}: Not ready yet, sleeping... Error: {e}")
4344
time.sleep(5)
4445

4546
if not success:

0 commit comments

Comments
 (0)