python-terminusgps 36.9.1__py3-none-any.whl → 36.9.2__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 python-terminusgps might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 36.9.1
3
+ Version: 36.9.2
4
4
  Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
5
5
  Project-URL: Documentation, https://docs.terminusgps.com
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -38,21 +38,21 @@ terminusgps/wialon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
38
38
  terminusgps/wialon/constants.py,sha256=05pLc_0S-x0tT87cQcxOmr8plesjOQxoXfUdjIHwI90,7732
39
39
  terminusgps/wialon/flags.py,sha256=M50EdhxQ8IMnJnU0mrHK7-h8Asc6tvNiTOOfd1dBW6A,12815
40
40
  terminusgps/wialon/session.py,sha256=eWRAWEikYdGr-0xa6yGHfTAxlCx9-1vsZDNwNZUJjZM,13771
41
- terminusgps/wialon/utils.py,sha256=iGOY8v7cNaSoA9Mo17d1bKAQMBtcotGq3FEQrghgvCo,11222
41
+ terminusgps/wialon/utils.py,sha256=D08bX2QK6vHQv7JAa03Xl0T8BU2BKJIuM1gU2lbYrJ4,10932
42
42
  terminusgps/wialon/validators.py,sha256=j5vrtcfClAzRdRkWTvRRAmrne1t0R6cKkmYdE7fAkSs,4247
43
43
  terminusgps/wialon/items/__init__.py,sha256=3BVthghekMvhMQSzQgBMlD_phxmKSmp3Zvmo-z0O8Bs,211
44
44
  terminusgps/wialon/items/base.py,sha256=vS8xIo5WLiwzpB81i7aHFnwOHzCf4lQG6azjq79HDM4,11775
45
- terminusgps/wialon/items/resource.py,sha256=X14qvYB9a8OH_LZfFL4BiaEPLnc6O-6OXN1SqRw7Ig8,18219
45
+ terminusgps/wialon/items/resource.py,sha256=Rhy2ig-yxznNhi6ZSaUBbu8ViVx0Sg4n_XS08ijgXsA,18280
46
46
  terminusgps/wialon/items/retranslator.py,sha256=2J1x7lNxRck-IEXrmJ7RM9bVL60mrZkfmczOSiUhiO8,3873
47
47
  terminusgps/wialon/items/route.py,sha256=2dEUK9o8nwutPE03W-5GUcZrjGvbwLoExVnFV9LyedE,1326
48
- terminusgps/wialon/items/unit.py,sha256=r5Fu6s9a5kS1Tk1jyqQodYeqKl-LjGOotGBP4kvCU2s,11836
48
+ terminusgps/wialon/items/unit.py,sha256=ELHiyCtUGfrxklLoYLqQRpTdBV-zH86m2YmUojJZq78,11944
49
49
  terminusgps/wialon/items/unit_group.py,sha256=HhYMZ9b7UATXeEgHkXN9r5-M_w82fabjDYADCUwBtxQ,4442
50
50
  terminusgps/wialon/items/user.py,sha256=pR6OTrm6f7Zo0J8eLvKtWVsdhGi430OxMsMMthGh8YE,5382
51
51
  terminusgps/wialon/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  terminusgps/wialon/tests/test_items.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  terminusgps/wialon/tests/test_session.py,sha256=9mBlYchMo9NeqRIZsmxYzrM1zBHorqu4ooxqSNppLpI,1336
54
54
  terminusgps/wialon/tests/test_utils.py,sha256=SK4PxJQGECFnzx_EQeRAQfsQ5_3FLaVcis2W9u_ibuI,1730
55
- python_terminusgps-36.9.1.dist-info/METADATA,sha256=wDhW6yG7H-XfPqhqgsckmf_lg54bVGWCbjNcqV_UAAU,1264
56
- python_terminusgps-36.9.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
57
- python_terminusgps-36.9.1.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
58
- python_terminusgps-36.9.1.dist-info/RECORD,,
55
+ python_terminusgps-36.9.2.dist-info/METADATA,sha256=e1KQ_v9YYhjAxwlBKbTvvEr6lNHRkc1ze4N1G5jcl4I,1264
56
+ python_terminusgps-36.9.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
57
+ python_terminusgps-36.9.2.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
58
+ python_terminusgps-36.9.2.dist-info/RECORD,,
@@ -9,6 +9,7 @@ class WialonResource(WialonBase):
9
9
  """A Wialon `resource/account <https://help.wialon.com/en/wialon-hosting/user-guide/management-system/accounts-and-resources>`_."""
10
10
 
11
11
  def __init__(self, *args, **kwargs) -> None:
12
+ """Sets :py:attr:`_is_account` to :py:obj:`None`."""
12
13
  super().__init__(*args, **kwargs)
13
14
  self._is_account = None
14
15
 
@@ -11,6 +11,7 @@ class WialonUnit(WialonBase):
11
11
  """A Wialon `unit <https://help.wialon.com/en/wialon-hosting/user-guide/management-system/units>`_."""
12
12
 
13
13
  def __init__(self, *args, **kwargs) -> None:
14
+ """Sets :py:attr:`_imei_number`, :py:attr:`_active` and :py:attr:`_image_uri` to :py:obj:`None`."""
14
15
  super().__init__(*args, **kwargs)
15
16
  self._imei_number = None
16
17
  self._active = None
@@ -204,8 +204,6 @@ def get_unit_by_imei(imei: str, session: WialonSession) -> WialonUnit | None:
204
204
  :param session: A valid Wialon API session.
205
205
  :type session: :py:obj:`~terminusgps.wialon.session.WialonSession`
206
206
  :raises ValueError: If ``imei`` contains non-digit characters.
207
- :raises ValueError: If ``imei`` points to multiple Wialon units.
208
- :raises WialonError: If something goes wrong during a Wialon API call.
209
207
  :returns: A Wialon object id, if it was found.
210
208
  :rtype: :py:obj:`str` | :py:obj:`None`
211
209
 
@@ -230,9 +228,7 @@ def get_unit_by_imei(imei: str, session: WialonSession) -> WialonUnit | None:
230
228
  }
231
229
  )
232
230
 
233
- if results is not None and results.get("totalItemsCount", 0) != 1:
234
- raise ValueError(f"Multiple units found with IMEI #: '{imei}'.")
235
- elif results is not None and results.get("totalItemsCount", 0) == 1:
231
+ if results is not None and results.get("totalItemsCount", 0) == 1:
236
232
  return WialonUnit(id=results["items"][0].get("id"), session=session)
237
233
 
238
234