Skip to content

Commit 58410dd

Browse files
committed
[geocom/ftr] updated download methods to return bytes
1 parent 088bd51 commit 58410dd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/geocompy/geo/ftr.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def setup_download(
238238
def download(
239239
self,
240240
block: int
241-
) -> GeoComResponse[str]:
241+
) -> GeoComResponse[bytes]:
242242
"""
243243
RPC 23304, ``FTR_Download``
244244
@@ -248,13 +248,13 @@ def download(
248248
Parameters
249249
----------
250250
block : int
251-
Number of data block to download.
251+
Index of data block to download.
252252
253253
Returns
254254
-------
255255
GeoComResponse
256256
Params:
257-
- `str`: Data block as hexadecimal byte string.
257+
- `bytes`: Data block.
258258
259259
Error codes:
260260
- ``FTR_MISSINGSETUP``: No active download setup.
@@ -270,7 +270,7 @@ def download(
270270
return self._request(
271271
23304,
272272
[block],
273-
parse_string
273+
lambda data: bytes.fromhex(parse_string(data))
274274
)
275275

276276
def abort_download(self) -> GeoComResponse[None]:
@@ -468,7 +468,7 @@ def setup_large_download(
468468
def download_large(
469469
self,
470470
block: int
471-
) -> GeoComResponse[str]:
471+
) -> GeoComResponse[bytes]:
472472
"""
473473
RPC 23314, ``FTR_DownloadXL``
474474
@@ -480,13 +480,13 @@ def download_large(
480480
Parameters
481481
----------
482482
block : int
483-
Number of data block to download.
483+
Index of data block to download.
484484
485485
Returns
486486
-------
487487
GeoComResponse
488488
Params:
489-
- `str`: Data block as hexadecimal byte string.
489+
- `bytes`: Data block.
490490
491491
Error codes:
492492
- ``FTR_MISSINGSETUP``: No active download setup.
@@ -502,5 +502,5 @@ def download_large(
502502
return self._request(
503503
23314,
504504
[block],
505-
parse_string
505+
lambda data: bytes.fromhex(parse_string(data))
506506
)

0 commit comments

Comments
 (0)