python-ember-mug 1.3.0b1__tar.gz → 1.3.0b3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-ember-mug
3
- Version: 1.3.0b1
3
+ Version: 1.3.0b3
4
4
  Summary: Python Library for Ember Mugs.
5
5
  Project-URL: Changelog, https://sopelj.github.io/python-ember-mug/changelog/
6
6
  Project-URL: Documentation, https://sopelj.github.io/python-ember-mug/
@@ -6,4 +6,4 @@ __all__ = ("EmberMug",)
6
6
 
7
7
  __author__ = """Jesse Sopel"""
8
8
  __email__ = "jesse.sopel@gmail.com"
9
- __version__ = "1.3.0b1"
9
+ __version__ = "1.3.0b3"
@@ -174,8 +174,6 @@ class EmberMug:
174
174
  disconnected_callback=self._disconnect_callback,
175
175
  ble_device_callback=lambda: self.device,
176
176
  )
177
- if self.debug:
178
- await discover_services(client)
179
177
  self._expected_disconnect = False
180
178
  except (TimeoutError, BleakError) as error:
181
179
  logger.debug("%s: Failed to connect to the mug: %s", self.device, error)
@@ -186,7 +186,10 @@ async def discover_services(client: BleakClient) -> dict[str, Any]:
186
186
  "descriptors": descriptors,
187
187
  }
188
188
  for descriptor in characteristic.descriptors:
189
- value = bytes(await client.read_gatt_descriptor(descriptor.handle))
189
+ try:
190
+ value = bytes(await client.read_gatt_descriptor(descriptor.handle))
191
+ except BleakError as e:
192
+ value = e
190
193
  logger.debug(
191
194
  "\t\t[Descriptor] %s: Handle: %s | Value: '%s'",
192
195
  descriptor.uuid,