pymammotion 0.2.14__py3-none-any.whl → 0.2.16__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.
Potentially problematic release.
This version of pymammotion might be problematic. Click here for more details.
- pymammotion/aliyun/cloud_gateway.py +10 -3
- pymammotion/proto/mctrl_sys.proto +1 -1
- pymammotion/proto/mctrl_sys.py +1 -1
- pymammotion/proto/mctrl_sys_pb2.pyi +1 -1
- {pymammotion-0.2.14.dist-info → pymammotion-0.2.16.dist-info}/METADATA +1 -1
- {pymammotion-0.2.14.dist-info → pymammotion-0.2.16.dist-info}/RECORD +8 -8
- {pymammotion-0.2.14.dist-info → pymammotion-0.2.16.dist-info}/LICENSE +0 -0
- {pymammotion-0.2.14.dist-info → pymammotion-0.2.16.dist-info}/WHEEL +0 -0
|
@@ -55,6 +55,8 @@ class AuthRefreshException(Exception):
|
|
|
55
55
|
class DeviceOfflineException(Exception):
|
|
56
56
|
"""Raise exception when device is offline."""
|
|
57
57
|
|
|
58
|
+
class LoginException(Exception):
|
|
59
|
+
"""Raise exception when library cannot log in."""
|
|
58
60
|
|
|
59
61
|
class CloudIOTGateway:
|
|
60
62
|
"""Class for interacting with Aliyun Cloud IoT Gateway."""
|
|
@@ -303,8 +305,11 @@ class CloudIOTGateway:
|
|
|
303
305
|
params={"request": json.dumps(_bodyParam, separators=(",", ":"))},
|
|
304
306
|
) as resp:
|
|
305
307
|
data = await resp.json()
|
|
306
|
-
self._connect_response = ConnectResponse.from_dict(data)
|
|
307
308
|
logger.debug(data)
|
|
309
|
+
if resp.status == 200:
|
|
310
|
+
self._connect_response = ConnectResponse.from_dict(data)
|
|
311
|
+
return self._connect_response
|
|
312
|
+
raise LoginException(data)
|
|
308
313
|
|
|
309
314
|
async def login_by_oauth(self, country_code: str, auth_code: str):
|
|
310
315
|
"""Login by OAuth."""
|
|
@@ -372,8 +377,10 @@ class CloudIOTGateway:
|
|
|
372
377
|
) as resp:
|
|
373
378
|
data = await resp.json()
|
|
374
379
|
logger.debug(data)
|
|
375
|
-
|
|
376
|
-
|
|
380
|
+
if resp.status == 200:
|
|
381
|
+
self._login_by_oauth_response = LoginByOAuthResponse.from_dict(data)
|
|
382
|
+
return self._login_by_oauth_response
|
|
383
|
+
raise LoginException(data)
|
|
377
384
|
|
|
378
385
|
def session_by_auth_code(self):
|
|
379
386
|
"""Create a session by auth code."""
|
pymammotion/proto/mctrl_sys.py
CHANGED
|
@@ -312,7 +312,7 @@ class LoraCfgRsp(betterproto.Message):
|
|
|
312
312
|
result: int = betterproto.int32_field(1)
|
|
313
313
|
op: int = betterproto.int32_field(2)
|
|
314
314
|
cfg: str = betterproto.string_field(3)
|
|
315
|
-
fac_cfg:
|
|
315
|
+
fac_cfg: bytes = betterproto.bytes_field(4)
|
|
316
316
|
|
|
317
317
|
|
|
318
318
|
@dataclass
|
|
@@ -82,7 +82,7 @@ class LoraCfgRsp(_message.Message):
|
|
|
82
82
|
OP_FIELD_NUMBER: _ClassVar[int]
|
|
83
83
|
RESULT_FIELD_NUMBER: _ClassVar[int]
|
|
84
84
|
cfg: str
|
|
85
|
-
fac_cfg:
|
|
85
|
+
fac_cfg: bytes
|
|
86
86
|
op: int
|
|
87
87
|
result: int
|
|
88
88
|
def __init__(self, result: _Optional[int] = ..., op: _Optional[int] = ..., cfg: _Optional[str] = ..., fac_cfg: _Optional[str] = ...) -> None: ...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
pymammotion/__init__.py,sha256=kmnjdt3AEMejIz5JK7h1tTJj5ZriAgKwZBa3ScA4-Ao,1516
|
|
2
2
|
pymammotion/aliyun/__init__.py,sha256=T1lkX7TRYiL4nqYanG4l4MImV-SlavSbuooC-W-uUGw,29
|
|
3
|
-
pymammotion/aliyun/cloud_gateway.py,sha256=
|
|
3
|
+
pymammotion/aliyun/cloud_gateway.py,sha256=RzlfDGzhaIZcu6o8gzGbSJGiQ3al73jTp3dNb6mqZrk,22221
|
|
4
4
|
pymammotion/aliyun/cloud_service.py,sha256=YWcKuKK6iRWy5mTnBYgHxcCusiRGGzQt3spSf7dGDss,2183
|
|
5
5
|
pymammotion/aliyun/dataclass/aep_response.py,sha256=8f6GIP58ve8gd6AL3HBoXxsy0n2q4ygWvjELGnoOnVc,452
|
|
6
6
|
pymammotion/aliyun/dataclass/connect_response.py,sha256=Yz-fEbDzgGPTo5Of2oAjmFkSv08T7ze80pQU4k-gKIU,824
|
|
@@ -99,10 +99,10 @@ pymammotion/proto/mctrl_pept.proto,sha256=HBTRiP1XJB5w9hT1V38aePPREpePBk5jkjupu_
|
|
|
99
99
|
pymammotion/proto/mctrl_pept.py,sha256=utMtbXsCwGS14YggTqUdVIbTZsR0w49B6gKU8jHzbJg,1332
|
|
100
100
|
pymammotion/proto/mctrl_pept_pb2.py,sha256=QqQ1BXo_EBs7cLmQGtRbnNy0rRxvaqtrGfKxXS8R5A8,2134
|
|
101
101
|
pymammotion/proto/mctrl_pept_pb2.pyi,sha256=gr0lxUPqhyEnDdni9vpIQnAIhqAGtHlv1rFeb5EJnMY,2840
|
|
102
|
-
pymammotion/proto/mctrl_sys.proto,sha256=
|
|
103
|
-
pymammotion/proto/mctrl_sys.py,sha256=
|
|
102
|
+
pymammotion/proto/mctrl_sys.proto,sha256=OHQ86tlBxzvWOaUeDt2OafVhgxvRA0a0naBPVYMLLfA,10193
|
|
103
|
+
pymammotion/proto/mctrl_sys.py,sha256=GVciaKPcp4h1qrIILHX_Pd76tKSBFlaEvFPF7FZsj8I,19108
|
|
104
104
|
pymammotion/proto/mctrl_sys_pb2.py,sha256=DYemb514mlC7c27t-k1YqqBif0xxhLmnIWk8rXtSj1c,21497
|
|
105
|
-
pymammotion/proto/mctrl_sys_pb2.pyi,sha256=
|
|
105
|
+
pymammotion/proto/mctrl_sys_pb2.pyi,sha256=Dj_1UM86kZ5MfcVyNC76Z0gKrfl5YFsVWP2b-bKoZvk,38912
|
|
106
106
|
pymammotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
107
107
|
pymammotion/utility/constant/__init__.py,sha256=tZz7szqIhrzNjfcLU3ysfINfg5VEBUAisd9AhP4mvT0,38
|
|
108
108
|
pymammotion/utility/constant/device_constant.py,sha256=aM69DJJy-h-btLP9RJezld1zm1rGz4gZRdRSpArVtmc,7109
|
|
@@ -111,7 +111,7 @@ pymammotion/utility/device_type.py,sha256=KYawu2glZMVlPmxRbA4kVFujXz3miHp3rJiOWR
|
|
|
111
111
|
pymammotion/utility/map.py,sha256=aoi-Luzuph02hKynTofMoq3mnPstanx75MDAVv49CuY,2211
|
|
112
112
|
pymammotion/utility/periodic.py,sha256=9wJMfwXPlx6Mbp3Fws7LLTI34ZDKphH1bva_Ggyk32g,3281
|
|
113
113
|
pymammotion/utility/rocker_util.py,sha256=syPL0QN4zMzHiTIkUKS7RXBBptjdbkfNlPddwUD5V3A,7171
|
|
114
|
-
pymammotion-0.2.
|
|
115
|
-
pymammotion-0.2.
|
|
116
|
-
pymammotion-0.2.
|
|
117
|
-
pymammotion-0.2.
|
|
114
|
+
pymammotion-0.2.16.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
115
|
+
pymammotion-0.2.16.dist-info/METADATA,sha256=SxR4HOcpH2rHpm6h34W7PzbAxJlopexjYivgbWpZthc,3969
|
|
116
|
+
pymammotion-0.2.16.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
117
|
+
pymammotion-0.2.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|