rclone-api 1.5.8__py3-none-any.whl → 1.5.9__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.
rclone_api/mount_util.py CHANGED
@@ -232,16 +232,19 @@ def clean_mount(mount: Mount | Path, verbose: bool = False, wait=True) -> None:
232
232
  if still_exists:
233
233
  verbose_print(f"{mount_path} still exists after unmount attempt.")
234
234
  # Attempt to remove the directory if it is empty.
235
- try:
236
- # Only remove if the directory is empty.
237
- if not any(mount_path.iterdir()):
235
+
236
+ # Only remove if the directory is empty.
237
+ if not any(mount_path.iterdir()):
238
+ try:
238
239
  mount_path.rmdir()
239
- if verbose:
240
- verbose_print(f"Removed empty mount directory {mount_path}")
241
- else:
242
- warnings.warn(f"{mount_path} is not empty; cannot remove.")
243
- raise OSError(f"{mount_path} is not empty")
244
- except Exception as e:
245
- warnings.warn(f"Failed during cleanup of {mount_path}: {e}")
240
+ except Exception as e:
241
+ warnings.warn(f"Error removing mount {mount_path}: {e}")
242
+ raise
243
+ if verbose:
244
+ verbose_print(f"Removed empty mount directory {mount_path}")
245
+ else:
246
+ warnings.warn(f"{mount_path} is not empty; cannot remove.")
247
+ raise OSError(f"{mount_path} is not empty")
248
+
246
249
  else:
247
250
  verbose_print(f"{mount_path} successfully cleaned up.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rclone_api
3
- Version: 1.5.8
3
+ Version: 1.5.9
4
4
  Summary: rclone api in python
5
5
  Home-page: https://github.com/zackees/rclone-api
6
6
  License: BSD 3-Clause License
@@ -18,7 +18,7 @@ rclone_api/http_server.py,sha256=LhovQu2AI-Z7zQIWflWelCiCDLnWzisL32Rs5350kxE,885
18
18
  rclone_api/install.py,sha256=Xb1BRn8rQcSpSd4dzmvIOELP2zM2DytUeIZ6jzv738A,2893
19
19
  rclone_api/log.py,sha256=VZHM7pNSXip2ZLBKMP7M1u-rp_F7zoafFDuR8CPUoKI,1271
20
20
  rclone_api/mount.py,sha256=LZqEhuKZunbWVqmsOIqkkCotaxWJpdFRS1InXveoU5E,1428
21
- rclone_api/mount_util.py,sha256=WXxGOhET1dPgbQg3bYIy54OPIh5dBzIYxvd_hT6tR_k,9054
21
+ rclone_api/mount_util.py,sha256=7Ky2KXG3YbxftQU8R1DnDzo3hcBpvSmwTPsd0ezHy5g,9058
22
22
  rclone_api/process.py,sha256=tGooS5NLdPuqHh7hCH8SfK44A6LGftPQCPQUNgSo0a0,5714
23
23
  rclone_api/rclone_impl.py,sha256=kr0gvOSuiwxU15rvATYZmSzpWYDiAzjZ2WNe1wqI6NM,46345
24
24
  rclone_api/remote.py,sha256=mTgMTQTwxUmbLjTpr-AGTId2ycXKI9mLX5L7PPpDIoc,520
@@ -53,9 +53,9 @@ rclone_api/s3/multipart/upload_parts_inline.py,sha256=V7syKjFyVIe4U9Ahl5XgqVTzt9
53
53
  rclone_api/s3/multipart/upload_parts_resumable.py,sha256=diJoUpVYow6No_dNgOZIYVsv43k4evb6zixqpzWJaUk,9771
54
54
  rclone_api/s3/multipart/upload_parts_server_side_merge.py,sha256=Fp2pdrs5dONQI9LkfNolgAGj1-Z2V1SsRd0r0sreuXI,18040
55
55
  rclone_api/s3/multipart/upload_state.py,sha256=f-Aq2NqtAaMUMhYitlICSNIxCKurWAl2gDEUVizLIqw,6019
56
- rclone_api-1.5.8.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
57
- rclone_api-1.5.8.dist-info/METADATA,sha256=z4pWEx3Zi5PCWcSKqYPoFMMFGLfVw-_i8K-a8fTYxos,32633
58
- rclone_api-1.5.8.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
59
- rclone_api-1.5.8.dist-info/entry_points.txt,sha256=fJteOlYVwgX3UbNuL9jJ0zUTuX2O79JFAeNgK7Sw7EQ,255
60
- rclone_api-1.5.8.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
61
- rclone_api-1.5.8.dist-info/RECORD,,
56
+ rclone_api-1.5.9.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
57
+ rclone_api-1.5.9.dist-info/METADATA,sha256=KDWkgAnwAVHj0GGPDKosvVJrxoJbJW92zYnmIuwPjGQ,32633
58
+ rclone_api-1.5.9.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
59
+ rclone_api-1.5.9.dist-info/entry_points.txt,sha256=fJteOlYVwgX3UbNuL9jJ0zUTuX2O79JFAeNgK7Sw7EQ,255
60
+ rclone_api-1.5.9.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
61
+ rclone_api-1.5.9.dist-info/RECORD,,