File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ package_dir =
5555# new major versions. This works if the required packages follow Semantic Versioning.
5656# For more information, check out https://semver.org/.
5757install_requires =
58- bluetooth-numbers>=0.2.1
58+ bluetooth-numbers>=1.0.0,<2.0
5959 bleak>=0.19.0
6060 importlib-metadata; python_version<"3.8"
6161 textual>=0.6.0
Original file line number Diff line number Diff line change 77from uuid import UUID
88
99from bleak .backends .scanner import AdvertisementData
10- from bluetooth_numbers . companies import company
11- from bluetooth_numbers .services import service
10+ from bluetooth_numbers import company , service
11+ from bluetooth_numbers .exceptions import UnknownCICError , UnknownUUIDError
1212from rich ._palettes import EIGHT_BIT_PALETTE
1313from rich .style import Style
1414from rich .table import Table
@@ -84,7 +84,7 @@ def __rich__(self) -> Text:
8484
8585 try :
8686 return Text .assemble (colored_uuid , f" ({ service [UUID (self .uuid128 )]} )" )
87- except KeyError :
87+ except UnknownUUIDError :
8888 return Text .assemble (colored_uuid , " (Unknown)" )
8989
9090
@@ -97,7 +97,7 @@ def __init__(self, cic: int) -> None:
9797 def __rich__ (self ) -> Text :
9898 try :
9999 manufacturer_name = company [self .cic ]
100- except KeyError :
100+ except UnknownCICError :
101101 manufacturer_name = "Unknown"
102102
103103 return Text .assemble (
You can’t perform that action at this time.
0 commit comments