python-ember-mug 1.4.0b2__py3-none-any.whl → 1.4.0b3__py3-none-any.whl

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.
ember_mug/__init__.py CHANGED
@@ -6,4 +6,4 @@ __all__ = ("EmberMug",)
6
6
 
7
7
  __author__ = """Jesse Sopel"""
8
8
  __email__ = "jesse@sopelj.ca"
9
- __version__ = "1.4.0b2"
9
+ __version__ = "1.4.0b3"
ember_mug/mug.py CHANGED
@@ -435,9 +435,19 @@ class EmberMug:
435
435
  """Update a list of attributes from the mug."""
436
436
  logger.debug("Updating the following attributes: %s", attrs)
437
437
  await self._ensure_connection()
438
- changes = self.data.update_info(**{attr: await getattr(self, f"get_{attr}")() for attr in attrs})
438
+ updates = {}
439
+ failed_attrs = set()
440
+ for attr in attrs:
441
+ try:
442
+ updates[attr] = await getattr(self, f"get_{attr}")()
443
+ except BleakError as e:
444
+ failed_attrs |= {attr}
445
+ logger.debug("Failed to fetch %s: %s", attr, e)
446
+ changes = self.data.update_info(**updates)
439
447
  if changes:
440
448
  self._fire_callbacks()
449
+ if failed_attrs:
450
+ logger.warning("Failed to fetch some attributes: %s", failed_attrs)
441
451
  logger.debug("Attributes updated: %s", changes)
442
452
  return changes
443
453
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-ember-mug
3
- Version: 1.4.0b2
3
+ Version: 1.4.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/
@@ -1,17 +1,17 @@
1
- ember_mug/__init__.py,sha256=WLDoYJ9jiZzdtAazvPcOUlWj9A9zdmm2u9AxIs-mzwI,184
1
+ ember_mug/__init__.py,sha256=8IfUFGsUmq-rwA17zehb1Z3MvGqx44Awi4iAHuH478c,184
2
2
  ember_mug/__main__.py,sha256=RrHlIwx8jOD1LdM4QsWNOtd51CnSGJeZAZQOgTc4ooA,107
3
3
  ember_mug/consts.py,sha256=buexPbnPHZBwo6bQshTyB56bobZO8Gbd6RjPLGZSjrY,7166
4
4
  ember_mug/data.py,sha256=v4skfxjAZtTnVzyxwGtmtf0fF7MRO2S8q6n-owsjHgg,10189
5
5
  ember_mug/formatting.py,sha256=VtJmmZ_Xj1w_G_P34Qiwvmu-tqKDrDlgV6jdfkdQEGc,1003
6
- ember_mug/mug.py,sha256=Na_NZbT1giV0amaXTmC_4bltx_oDfNrPPXmvqOf13jA,22411
6
+ ember_mug/mug.py,sha256=w2bJnPQf6dfryylMI2LGpLBQ_ND81PkN60kBQqeJhTU,22763
7
7
  ember_mug/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  ember_mug/scanner.py,sha256=FguRd9cDHgehoQjDEAogp2AQ0HDqQGVC4mlRbmu7j6c,2911
9
9
  ember_mug/utils.py,sha256=suaUwTb798pnTL3GHG6SGLq_48FBdINTwc6XUQI7jAA,7446
10
10
  ember_mug/cli/__init__.py,sha256=4Gfs2cdFjYRdPC2aaE39xzIlVceaVElchORDSByjQFg,297
11
11
  ember_mug/cli/commands.py,sha256=LdOjBjgd3kqSXSZxPDxzMB8EZmgWVth1jUYIYJWx3I4,11280
12
12
  ember_mug/cli/helpers.py,sha256=HD4-3JQdn6o9FPZqA9VH3UW_8lRhYKcMfnKQkpP7AKw,3037
13
- python_ember_mug-1.4.0b2.dist-info/METADATA,sha256=bz2SWxL4nmsGaoR3Vy7aYomKAe1OeKFVwuY-_-T8_4c,11121
14
- python_ember_mug-1.4.0b2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
15
- python_ember_mug-1.4.0b2.dist-info/entry_points.txt,sha256=XnXY0yFmWAcuBhASqYXA5TUp53dIDnPQ1XMT25Sg_q4,52
16
- python_ember_mug-1.4.0b2.dist-info/licenses/LICENSE,sha256=tE5tCbzaSrE1IIW3eijH3lwRbaTEFfXuhCweYdLk17M,1069
17
- python_ember_mug-1.4.0b2.dist-info/RECORD,,
13
+ python_ember_mug-1.4.0b3.dist-info/METADATA,sha256=FJCoCDP4gLEjw3Il9PP_nK9YpKRvpcDMq1-rO3To6nQ,11121
14
+ python_ember_mug-1.4.0b3.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
15
+ python_ember_mug-1.4.0b3.dist-info/entry_points.txt,sha256=XnXY0yFmWAcuBhASqYXA5TUp53dIDnPQ1XMT25Sg_q4,52
16
+ python_ember_mug-1.4.0b3.dist-info/licenses/LICENSE,sha256=tE5tCbzaSrE1IIW3eijH3lwRbaTEFfXuhCweYdLk17M,1069
17
+ python_ember_mug-1.4.0b3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.29.0
2
+ Generator: hatchling 1.31.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any