outleap 0.7.3__py3-none-any.whl → 0.7.4__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.
- outleap/api_wrappers.py +14 -1
- outleap/version.py +2 -2
- {outleap-0.7.3.dist-info → outleap-0.7.4.dist-info}/METADATA +1 -1
- {outleap-0.7.3.dist-info → outleap-0.7.4.dist-info}/RECORD +8 -8
- {outleap-0.7.3.dist-info → outleap-0.7.4.dist-info}/WHEEL +0 -0
- {outleap-0.7.3.dist-info → outleap-0.7.4.dist-info}/entry_points.txt +0 -0
- {outleap-0.7.3.dist-info → outleap-0.7.4.dist-info}/licenses/COPYING +0 -0
- {outleap-0.7.3.dist-info → outleap-0.7.4.dist-info}/top_level.txt +0 -0
outleap/api_wrappers.py
CHANGED
|
@@ -22,12 +22,25 @@ class LEAPAPIWrapper(abc.ABC):
|
|
|
22
22
|
assert self._pump_name
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
class LEAPAPIError(Exception):
|
|
26
|
+
"""Error reported from API."""
|
|
27
|
+
|
|
28
|
+
response_data: Dict
|
|
29
|
+
|
|
30
|
+
def __init__(self, error_message: str, response_data: Dict):
|
|
31
|
+
super().__init__(error_message)
|
|
32
|
+
self.response_data = response_data
|
|
33
|
+
|
|
34
|
+
|
|
25
35
|
async def _data_unwrapper(data_fut: Awaitable[Dict], inner_elem: str) -> Any:
|
|
26
36
|
"""Unwraps part of the data future while allowing the request itself to remain synchronous"""
|
|
27
37
|
# We want the request to be sent immediately, without requiring the request to be `await`ed first,
|
|
28
38
|
# but that means that we have to return a `Coroutine` that will pull the value out of the dict
|
|
29
39
|
# rather than directly returning the `Future`.
|
|
30
|
-
|
|
40
|
+
response = await data_fut
|
|
41
|
+
if err_msg := response.get("error"):
|
|
42
|
+
raise LEAPAPIError(err_msg, response)
|
|
43
|
+
return response[inner_elem]
|
|
31
44
|
|
|
32
45
|
|
|
33
46
|
class CommandAPI(LEAPAPIWrapper):
|
outleap/version.py
CHANGED
|
@@ -5,7 +5,7 @@ from collections import namedtuple
|
|
|
5
5
|
#: A namedtuple of the version info for the current release.
|
|
6
6
|
_version_info = namedtuple("_version_info", "major minor micro status")
|
|
7
7
|
|
|
8
|
-
parts = "0.7.
|
|
8
|
+
parts = "0.7.4".split(".", 3)
|
|
9
9
|
version_info = _version_info(
|
|
10
10
|
int(parts[0]),
|
|
11
11
|
int(parts[1]),
|
|
@@ -16,4 +16,4 @@ version_info = _version_info(
|
|
|
16
16
|
# Remove everything but the 'version_info' from this module.
|
|
17
17
|
del namedtuple, _version_info, parts
|
|
18
18
|
|
|
19
|
-
__version__ = "0.7.
|
|
19
|
+
__version__ = "0.7.4"
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
outleap/__init__.py,sha256=h0VTP95rggZ-iFH1Ke4rh85fiU3BTvfj_jkLW27Ln1k,689
|
|
2
|
-
outleap/api_wrappers.py,sha256=
|
|
2
|
+
outleap/api_wrappers.py,sha256=i8Bpz3AMM7Ghose9Wi0MbYDJzlzVqYwICQFwhaFYfyM,27144
|
|
3
3
|
outleap/bridge.py,sha256=Q5tku2JP-K0wT9zVA8OyJpFEpumgbUgHaC1YeRQR8vE,1016
|
|
4
4
|
outleap/client.py,sha256=4RFTOSiL2cCwpJ64_sux_DbFh_LjnwjVIlByutGg-ao,14545
|
|
5
5
|
outleap/protocol.py,sha256=HeCnlzszGp6Yxgq__34KYYuii6tpxnfUi5La9SFxw0k,3725
|
|
6
6
|
outleap/qt_helpers.py,sha256=qpdEx7y60T3nAJ4GFDvpcefKEgpgBBnt8dQ-c2IB-Zc,7766
|
|
7
7
|
outleap/ui_elems.py,sha256=ndi3FDp_fu1rVD3rNpFp6hs8eU53U4D_dCtuwFmums0,11577
|
|
8
8
|
outleap/utils.py,sha256=uRoP_A_dcwhlpaDPOQETzFLfQ_fDS3KQfrwwew-nSyI,5902
|
|
9
|
-
outleap/version.py,sha256=
|
|
9
|
+
outleap/version.py,sha256=z-OiZ8ucVeMwy9kQAgq-Lhk5XgdpaudwMxZ-rbvxXx4,517
|
|
10
10
|
outleap/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
outleap/scripts/agent.py,sha256=YOXtkjqZY7ju9fLhBHRzdhsp9TdhPnDzsXiQo5-Dhfs,1984
|
|
12
12
|
outleap/scripts/inspector.py,sha256=h_2So4ohXlE4qOcYzfFRFiKdMItXmPFnVh50KwfoXmM,10950
|
|
13
13
|
outleap/scripts/repl.py,sha256=z20hpXY5_O68U2WX1Il5tRGRyafsKHa-FNeF9CoJpZk,1721
|
|
14
14
|
outleap/scripts/ui/inspector.ui,sha256=CY-Tczsrpmc2groE6_7s_fIc7de6Oy2TuU2a4ZGzl7o,7269
|
|
15
|
-
outleap-0.7.
|
|
16
|
-
outleap-0.7.
|
|
17
|
-
outleap-0.7.
|
|
18
|
-
outleap-0.7.
|
|
19
|
-
outleap-0.7.
|
|
20
|
-
outleap-0.7.
|
|
15
|
+
outleap-0.7.4.dist-info/licenses/COPYING,sha256=OPIPYHZUdL5ylRYaujIVg05CSvX4-AHW15qBGYz_fyY,1093
|
|
16
|
+
outleap-0.7.4.dist-info/METADATA,sha256=wz7kZbaHJ2gTPSFBjH_Dwg-72HpfO-JB9_HAGQJsCbY,4819
|
|
17
|
+
outleap-0.7.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
18
|
+
outleap-0.7.4.dist-info/entry_points.txt,sha256=gi7UECBDlCTzn0jUU8xPvyMm_8lOQMZUJuNOe266I48,174
|
|
19
|
+
outleap-0.7.4.dist-info/top_level.txt,sha256=dIQJmMy2IulmIzvBWuz8dup0dm9MV0b4p_hCtBRewfE,8
|
|
20
|
+
outleap-0.7.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|