From 9acec07645f87778329e2a8a554121308d4c5d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20L=C3=B6w?= Date: Mon, 27 Dec 2021 01:28:22 +0100 Subject: [PATCH] :art: use the TelloException when raising exceptions from TelloSwarm (ref #129) --- djitellopy/__init__.py | 2 +- djitellopy/swarm.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/djitellopy/__init__.py b/djitellopy/__init__.py index 5d220e5..9b5f121 100644 --- a/djitellopy/__init__.py +++ b/djitellopy/__init__.py @@ -1,2 +1,2 @@ -from .tello import Tello, BackgroundFrameRead +from .tello import Tello, TelloException, BackgroundFrameRead from .swarm import TelloSwarm \ No newline at end of file diff --git a/djitellopy/swarm.py b/djitellopy/swarm.py index bbd27b3..98c2121 100644 --- a/djitellopy/swarm.py +++ b/djitellopy/swarm.py @@ -5,7 +5,7 @@ from queue import Queue from typing import List, Callable -from .tello import Tello +from .tello import Tello, TelloException from .enforce_types import enforce_types @@ -40,7 +40,7 @@ def fromIps(ips: list): ips: list of IP Addresses """ if not ips: - raise ValueError("No ips provided") + raise TelloException("No ips provided") tellos = [] for ip in ips: