rclone-api 1.0.92__py2.py3-none-any.whl → 1.0.93__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.
rclone_api/s3/api.py CHANGED
@@ -1,3 +1,4 @@
1
+ import json
1
2
  import warnings
2
3
 
3
4
  from botocore.client import BaseClient
@@ -74,11 +75,21 @@ class S3Client:
74
75
  max_chunks_before_suspension=max_chunks_before_suspension,
75
76
  )
76
77
  return out
77
- except Exception:
78
+ except Exception as e:
78
79
  key = upload_target.s3_key
79
80
  access_key_id = self.credentials.access_key_id[:4] + "..."
80
81
  secret = self.credentials.secret_access_key[:4] + "..."
81
- warnings.warn(
82
- f"Error uploading {key} to {bucket_name} with\n access_key_id: {access_key_id}\n secret: {secret}\n"
83
- )
82
+ endpoint_url = self.credentials.endpoint_url
83
+ provider = self.credentials.provider
84
+ region_name = self.credentials.region_name
85
+ info_json = {
86
+ "key": key,
87
+ "access_key_id": access_key_id[:4] + "...",
88
+ "secret": secret[:4] + "...",
89
+ "endpoint_url": endpoint_url,
90
+ "provider": provider,
91
+ "region": region_name,
92
+ }
93
+ info_json_str = json.dumps(info_json, indent=2)
94
+ warnings.warn(f"Error uploading file: {e}\nInfo:\n\n{info_json_str}")
84
95
  raise
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rclone_api
3
- Version: 1.0.92
3
+ Version: 1.0.93
4
4
  Summary: rclone api in python
5
5
  Home-page: https://github.com/zackees/rclone-api
6
6
  License: BSD 3-Clause License
@@ -22,14 +22,14 @@ rclone_api/walk.py,sha256=-54NVE8EJcCstwDoaC_UtHm73R2HrZwVwQmsnv55xNU,3369
22
22
  rclone_api/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
23
23
  rclone_api/cmd/copy_large_s3.py,sha256=FPU0S1Y9pApVLmWcdMT_3llywjEtOtwobXTnMXE-FhY,2690
24
24
  rclone_api/cmd/list_files.py,sha256=x8FHODEilwKqwdiU1jdkeJbLwOqUkUQuDWPo2u_zpf0,741
25
- rclone_api/s3/api.py,sha256=7elz5U5su4rdPHEMHHMBZ_vESQobJDTK_MR7sA_a1YU,3182
25
+ rclone_api/s3/api.py,sha256=sks9QLErHsLJ06Af7zJSa5-E05_vHqi9YJQxomtx3D8,3639
26
26
  rclone_api/s3/basic_ops.py,sha256=hK3366xhVEzEcjz9Gk_8lFx6MRceAk72cax6mUrr6ko,2104
27
27
  rclone_api/s3/chunk_uploader.py,sha256=Wcm4h_A6ORaJvT9P9qSeknbJYch22RKZ4FGo1iePlAw,17385
28
28
  rclone_api/s3/create.py,sha256=X4mgjekgAoyHNeXnznHNS63DFViAhI0p7-fXDxml0y4,2701
29
29
  rclone_api/s3/types.py,sha256=81_3jwg6MGIxC-GxL-6zANzKO6au9C0BWvAqRyODxOM,1361
30
- rclone_api-1.0.92.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
31
- rclone_api-1.0.92.dist-info/METADATA,sha256=rCGGQg-8Xgf7fRatzVH0cmaNtwVhXsFkc8NO7rPYVY8,4479
32
- rclone_api-1.0.92.dist-info/WHEEL,sha256=rF4EZyR2XVS6irmOHQIJx2SUqXLZKRMUrjsg8UwN-XQ,109
33
- rclone_api-1.0.92.dist-info/entry_points.txt,sha256=6eNqTRXKhVf8CpWNjXiOa_0Du9tHiW_HD2iQSXRsUg8,132
34
- rclone_api-1.0.92.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
35
- rclone_api-1.0.92.dist-info/RECORD,,
30
+ rclone_api-1.0.93.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
31
+ rclone_api-1.0.93.dist-info/METADATA,sha256=T1_yOU3wV_gKRNH_bNGH9YSvOaj2rwyy8eIpQT1cw0k,4479
32
+ rclone_api-1.0.93.dist-info/WHEEL,sha256=rF4EZyR2XVS6irmOHQIJx2SUqXLZKRMUrjsg8UwN-XQ,109
33
+ rclone_api-1.0.93.dist-info/entry_points.txt,sha256=6eNqTRXKhVf8CpWNjXiOa_0Du9tHiW_HD2iQSXRsUg8,132
34
+ rclone_api-1.0.93.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
35
+ rclone_api-1.0.93.dist-info/RECORD,,