-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#62] An unexpected error occured while loading the data.
- Loading branch information
Stéphane Senart
committed
Oct 7, 2024
1 parent
f6747a3
commit 0958ad2
Showing
7 changed files
with
147 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,5 @@ | |
"requirements": [ | ||
"pygazpar==1.2.3" | ||
], | ||
"version": "1.3.7" | ||
"version": "1.3.8" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
import json | ||
import os | ||
import asyncio | ||
|
||
|
||
# -------------------------------------------------------------------------------------------- | ||
class Manifest: | ||
|
||
# --------------------------------- | ||
@staticmethod | ||
def version(): | ||
async def version(): | ||
|
||
manifestFilePath = f"{os.path.dirname(__file__)}/manifest.json" | ||
|
||
with open(manifestFilePath) as jsonFile: | ||
manifest = json.load(jsonFile) | ||
loop = asyncio.get_event_loop() | ||
manifest = await loop.run_in_executor(None, Manifest.load_manifest, manifestFilePath) | ||
|
||
return manifest["version"] | ||
|
||
# --------------------------------- | ||
@staticmethod | ||
def load_manifest(manifestFilePath): | ||
with open(manifestFilePath) as jsonFile: | ||
manifest = json.load(jsonFile) | ||
return manifest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
--extra-index-url https://pypi.org/simple | ||
flake8 | ||
pytest | ||
pytest-asyncio | ||
pygazpar | ||
homeassistant |
Oops, something went wrong.