Skip to content

Commit d123b47

Browse files
committed
Use warnings.warn() in load_from_thrustcurve_api when motor is found (as requested)
1 parent 9fdc704 commit d123b47

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

rocketpy/motors/motor.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import base64
2-
import logging
32
import re
43
import tempfile
54
import warnings
@@ -16,8 +15,6 @@
1615
from ..prints.motor_prints import _MotorPrints
1716
from ..tools import parallel_axis_theorem_from_com, tuple_handler
1817

19-
logger = logging.getLogger(__name__)
20-
2118

2219
# pylint: disable=too-many-public-methods
2320
class Motor(ABC):
@@ -1965,8 +1962,7 @@ def load_from_thrustcurve_api(name: str, **kwargs):
19651962
motor_id = motor_info.get("motorId")
19661963
designation = motor_info.get("designation", "").replace("/", "-")
19671964
manufacturer = motor_info.get("manufacturer", "")
1968-
# Logging the fact that the motor was found
1969-
logger.info(f"Motor found: {designation} ({manufacturer})")
1965+
warnings.warn(f"Motor found: {designation} ({manufacturer})", UserWarning)
19701966

19711967
# Step 2. Download the .eng file
19721968
dl_response = requests.get(

0 commit comments

Comments
 (0)