rclone-api 1.0.100__py2.py3-none-any.whl → 1.1.0__py2.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.
@@ -295,22 +295,23 @@ def file_chunker(
295
295
  chunk_size = upload_info.chunk_size
296
296
  src = Path(file_path)
297
297
  # Mounted files may take a while to appear, so keep retrying.
298
- file_size = _get_file_size(src, timeout=60)
299
- part_number = 1
300
- done_part_numbers: set[int] = {
301
- p.part_number for p in upload_state.parts if p is not None
302
- }
303
- num_parts = upload_info.total_chunks()
304
-
305
- def next_part_number() -> int | None:
306
- nonlocal part_number
307
- while part_number in done_part_numbers:
308
- part_number += 1
309
- if part_number > num_parts:
310
- return None
311
- return part_number
312
298
 
313
299
  try:
300
+ file_size = _get_file_size(src, timeout=60)
301
+ part_number = 1
302
+ done_part_numbers: set[int] = {
303
+ p.part_number for p in upload_state.parts if p is not None
304
+ }
305
+ num_parts = upload_info.total_chunks()
306
+
307
+ def next_part_number() -> int | None:
308
+ nonlocal part_number
309
+ while part_number in done_part_numbers:
310
+ part_number += 1
311
+ if part_number > num_parts:
312
+ return None
313
+ return part_number
314
+
314
315
  while not should_stop():
315
316
  curr_parth_num = next_part_number()
316
317
  if curr_parth_num is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rclone_api
3
- Version: 1.0.100
3
+ Version: 1.1.0
4
4
  Summary: rclone api in python
5
5
  Home-page: https://github.com/zackees/rclone-api
6
6
  License: BSD 3-Clause License
@@ -25,12 +25,12 @@ rclone_api/cmd/list_files.py,sha256=x8FHODEilwKqwdiU1jdkeJbLwOqUkUQuDWPo2u_zpf0,
25
25
  rclone_api/experimental/flags.py,sha256=AHbTaFHuyYFm3pjdvbQ100jztOXOdNuxalMr8UjXnV4,4097
26
26
  rclone_api/s3/api.py,sha256=VstlaEnBjO2JDQuCRLdTfUGvQLbfshlXXhAzimFv4Vc,3763
27
27
  rclone_api/s3/basic_ops.py,sha256=hK3366xhVEzEcjz9Gk_8lFx6MRceAk72cax6mUrr6ko,2104
28
- rclone_api/s3/chunk_uploader.py,sha256=-GzafZ93Mm9go7BqOaq8svPsjAwtFbVuzVpFdtw8cVA,18283
28
+ rclone_api/s3/chunk_uploader.py,sha256=txnNtugKcTb1UDmPbqWp3K-yLUDEkeW72nEnQnDcA8o,18336
29
29
  rclone_api/s3/create.py,sha256=SK3IGHZwsSkoG4Zb4NCphcVg9_f7VifDKng-tExMS2s,3088
30
30
  rclone_api/s3/types.py,sha256=81_3jwg6MGIxC-GxL-6zANzKO6au9C0BWvAqRyODxOM,1361
31
- rclone_api-1.0.100.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
32
- rclone_api-1.0.100.dist-info/METADATA,sha256=ZuM5x0cJJyMDGIi2HApzr4yqo9JdoMLCSOLyUiWkD9w,4480
33
- rclone_api-1.0.100.dist-info/WHEEL,sha256=rF4EZyR2XVS6irmOHQIJx2SUqXLZKRMUrjsg8UwN-XQ,109
34
- rclone_api-1.0.100.dist-info/entry_points.txt,sha256=6eNqTRXKhVf8CpWNjXiOa_0Du9tHiW_HD2iQSXRsUg8,132
35
- rclone_api-1.0.100.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
36
- rclone_api-1.0.100.dist-info/RECORD,,
31
+ rclone_api-1.1.0.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
32
+ rclone_api-1.1.0.dist-info/METADATA,sha256=lWksanXlrw5bUyZxWDjFpntBvxsBWd2IBImny4OZRZs,4478
33
+ rclone_api-1.1.0.dist-info/WHEEL,sha256=rF4EZyR2XVS6irmOHQIJx2SUqXLZKRMUrjsg8UwN-XQ,109
34
+ rclone_api-1.1.0.dist-info/entry_points.txt,sha256=6eNqTRXKhVf8CpWNjXiOa_0Du9tHiW_HD2iQSXRsUg8,132
35
+ rclone_api-1.1.0.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
36
+ rclone_api-1.1.0.dist-info/RECORD,,