Skip to content

Commit

Permalink
logging: add DeprecationWarning category to other warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasNeugebauer committed Jan 20, 2025
1 parent e5040a4 commit 07010c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rosys/vision/rtsp_camera/rtsp_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,17 @@ async def get_fps(self) -> int | None:

def get_jovision_profile(self) -> int | None:
assert self.device is not None
warnings.warn('get_jovision_profile is deprecated, use get_substream instead', stacklevel=3)
warnings.warn('get_jovision_profile is deprecated, use get_substream instead',
category=DeprecationWarning,
stacklevel=3)

return self.device.get_substream()

def set_jovision_profile(self, profile: int) -> None:
assert self.device is not None
warnings.warn('set_jovision_profile is deprecated, use set_substream instead', stacklevel=3)
warnings.warn('set_jovision_profile is deprecated, use set_substream instead',
category=DeprecationWarning,
stacklevel=3)

self.device.set_substream(profile)

Expand Down

0 comments on commit 07010c6

Please sign in to comment.