lifx-async 4.8.0__py3-none-any.whl → 4.8.1__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.
- lifx/products/generator.py +7 -5
- lifx/protocol/generator.py +7 -5
- {lifx_async-4.8.0.dist-info → lifx_async-4.8.1.dist-info}/METADATA +1 -1
- {lifx_async-4.8.0.dist-info → lifx_async-4.8.1.dist-info}/RECORD +6 -6
- {lifx_async-4.8.0.dist-info → lifx_async-4.8.1.dist-info}/WHEEL +0 -0
- {lifx_async-4.8.0.dist-info → lifx_async-4.8.1.dist-info}/licenses/LICENSE +0 -0
lifx/products/generator.py
CHANGED
|
@@ -16,7 +16,7 @@ from urllib.request import urlopen
|
|
|
16
16
|
from lifx.const import PRODUCTS_URL
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
def download_products() -> dict[str, Any] | list[dict[str, Any]]:
|
|
19
|
+
def download_products() -> dict[str, Any] | list[dict[str, Any]] | None:
|
|
20
20
|
"""Download and parse products.json from LIFX GitHub repository.
|
|
21
21
|
|
|
22
22
|
Returns:
|
|
@@ -27,11 +27,13 @@ def download_products() -> dict[str, Any] | list[dict[str, Any]]:
|
|
|
27
27
|
json.JSONDecodeError: If parsing fails
|
|
28
28
|
"""
|
|
29
29
|
parsed_url = urlparse(PRODUCTS_URL)
|
|
30
|
-
if
|
|
31
|
-
|
|
30
|
+
if (
|
|
31
|
+
parsed_url.scheme == "https"
|
|
32
|
+
and parsed_url.netloc == "raw.githubusercontent.com"
|
|
33
|
+
and parsed_url.path.startswith("/LIFX/")
|
|
32
34
|
):
|
|
33
|
-
print(f"Downloading products.json from {
|
|
34
|
-
with urlopen(
|
|
35
|
+
print(f"Downloading products.json from {parsed_url.geturl()}...")
|
|
36
|
+
with urlopen(parsed_url.geturl()) as response: # nosec B310
|
|
35
37
|
products_data = response.read()
|
|
36
38
|
|
|
37
39
|
print("Parsing products specification...")
|
lifx/protocol/generator.py
CHANGED
|
@@ -1397,7 +1397,7 @@ from lifx.protocol.base import Packet
|
|
|
1397
1397
|
return code
|
|
1398
1398
|
|
|
1399
1399
|
|
|
1400
|
-
def download_protocol() -> dict[str, Any]:
|
|
1400
|
+
def download_protocol() -> dict[str, Any] | None:
|
|
1401
1401
|
"""Download and parse protocol.yml from LIFX GitHub repository.
|
|
1402
1402
|
|
|
1403
1403
|
Returns:
|
|
@@ -1408,11 +1408,13 @@ def download_protocol() -> dict[str, Any]:
|
|
|
1408
1408
|
yaml.YAMLError: If parsing fails
|
|
1409
1409
|
"""
|
|
1410
1410
|
parsed_url = urlparse(PROTOCOL_URL)
|
|
1411
|
-
if
|
|
1412
|
-
|
|
1411
|
+
if (
|
|
1412
|
+
parsed_url.scheme == "https"
|
|
1413
|
+
and parsed_url.netloc == "raw.githubusercontent.com"
|
|
1414
|
+
and parsed_url.path.startswith("/LIFX/")
|
|
1413
1415
|
):
|
|
1414
|
-
print(f"Downloading protocol.yml from {
|
|
1415
|
-
with urlopen(
|
|
1416
|
+
print(f"Downloading protocol.yml from {parsed_url.geturl()}...")
|
|
1417
|
+
with urlopen(parsed_url.geturl()) as response: # nosec B310
|
|
1416
1418
|
protocol_data = response.read()
|
|
1417
1419
|
|
|
1418
1420
|
print("Parsing protocol specification...")
|
|
@@ -31,12 +31,12 @@ lifx/network/mdns/dns.py,sha256=OsvNSxLepIG3Nhw-kkQF3JrBYI-ikod5SHD2HO5_yGE,9363
|
|
|
31
31
|
lifx/network/mdns/transport.py,sha256=k8gVZCvU-gksV2dV-jm2YG-_kuKWx0whtP3Va0EjCd8,10242
|
|
32
32
|
lifx/network/mdns/types.py,sha256=9fhH5iuMQxLkFPhmFTf2-kOcUNoWEu7LrN15Qr9tFE0,990
|
|
33
33
|
lifx/products/__init__.py,sha256=pf2O-fzt6nOrQd-wmzhiog91tMiGa-dDbaSNtU2ZQfE,764
|
|
34
|
-
lifx/products/generator.py,sha256=
|
|
34
|
+
lifx/products/generator.py,sha256=DsTCJcEVPmn9sfXSbXYdFZjqMfIbodnIQL46DRASs0g,15731
|
|
35
35
|
lifx/products/quirks.py,sha256=B8Kb4pxaXmovMbjgXRfPPWre5JEvJrn8d6PAWK_FT1U,2544
|
|
36
36
|
lifx/products/registry.py,sha256=ILIJlQxcxJUzRH-LGU_bnHjV-TxDEucKovuJcWvG4q8,43831
|
|
37
37
|
lifx/protocol/__init__.py,sha256=-wjC-wBcb7fxi5I-mJr2Ad8K2YRflJFdLLdobfD-W1Q,56
|
|
38
38
|
lifx/protocol/base.py,sha256=x4cKT5sbaEmILbmPH3y5Lwk6gj3h9Xv_JvTX91cPQwM,12354
|
|
39
|
-
lifx/protocol/generator.py,sha256=
|
|
39
|
+
lifx/protocol/generator.py,sha256=RWu4zC-b_JhonLM5fbAufQyKxEI2myLyCnt7tu3POMI,60690
|
|
40
40
|
lifx/protocol/header.py,sha256=HaYQ5wEjAMgefO3dIxKb0w4VG4fLcfLj-fnHVwfp1ao,7174
|
|
41
41
|
lifx/protocol/models.py,sha256=eOvOSAWbglR1SYWcC_YpicewtsdbVlQ6E2lfcC4NQrk,8172
|
|
42
42
|
lifx/protocol/packets.py,sha256=ENp3irGITdV5rGah3eUzgsXqihI95upAPh7AdTsP7sk,43303
|
|
@@ -47,7 +47,7 @@ lifx/theme/canvas.py,sha256=4h7lgN8iu_OdchObGDgbxTqQLCb-FRKC-M-YCWef_i4,8048
|
|
|
47
47
|
lifx/theme/generators.py,sha256=nq3Yvntq_h-eFHbmmow3LcAdA_hEbRRaP5mv9Bydrjk,6435
|
|
48
48
|
lifx/theme/library.py,sha256=tKlKZNqJp8lRGDnilWyDm_Qr1vCRGGwuvWVS82anNpQ,21326
|
|
49
49
|
lifx/theme/theme.py,sha256=qMEx_8E41C0Cc6f083XHiAXEglTv4YlXW0UFsG1rQKg,5521
|
|
50
|
-
lifx_async-4.8.
|
|
51
|
-
lifx_async-4.8.
|
|
52
|
-
lifx_async-4.8.
|
|
53
|
-
lifx_async-4.8.
|
|
50
|
+
lifx_async-4.8.1.dist-info/METADATA,sha256=Euz_zOCJMdS0w1GJ4D1nBKJJMdEMEdNFzTqB3mcZOAM,2609
|
|
51
|
+
lifx_async-4.8.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
52
|
+
lifx_async-4.8.1.dist-info/licenses/LICENSE,sha256=eBz48GRA3gSiWn3rYZAz2Ewp35snnhV9cSqkVBq7g3k,1832
|
|
53
|
+
lifx_async-4.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|