rclone-bin-api 1.0.3__tar.gz → 1.0.4__tar.gz
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_bin_api-1.0.3 → rclone_bin_api-1.0.4}/PKG-INFO +1 -1
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/pyproject.toml +1 -1
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/rclone_api/api.py +5 -1
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/rclone_bin_api.egg-info/PKG-INFO +1 -1
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/README.md +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/setup.cfg +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/setup.py +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/examples/__init__.py +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/examples/about.py +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/rclone_api/__init__.py +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/rclone_api/dto.py +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/rclone_api/exceptions.py +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/rclone_bin_api.egg-info/SOURCES.txt +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/rclone_bin_api.egg-info/dependency_links.txt +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/rclone_bin_api.egg-info/top_level.txt +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/tests/test_exceptions.py +0 -0
- {rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/tests/test_rclone.py +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[project]
|
|
3
3
|
name = "rclone-bin-api"
|
|
4
4
|
description = "Rclone API for Python including the Rclone binaries."
|
|
5
|
-
version = "1.0.
|
|
5
|
+
version = "1.0.4"
|
|
6
6
|
authors = [{ name = "Michael G", email = "me@mgineer85.de" }]
|
|
7
7
|
maintainers = [{ name = "Michael G", email = "me@mgineer85.de" }]
|
|
8
8
|
requires-python = ">=3.11"
|
|
@@ -125,6 +125,8 @@ class RcloneApi:
|
|
|
125
125
|
assert not (not fs.endswith(":") and not Path(fs).is_absolute()), f"fs must be absolute when remote is a local path: {fs=} {remote=}"
|
|
126
126
|
|
|
127
127
|
def _post(self, endpoint: str, data: dict[str, Any] | None = None):
|
|
128
|
+
TIMEOUT = 90
|
|
129
|
+
|
|
128
130
|
req = urllib.request.Request(
|
|
129
131
|
url=f"{self.__connect_addr}/{endpoint}",
|
|
130
132
|
data=json.dumps(data or {}).encode("utf-8"),
|
|
@@ -133,7 +135,7 @@ class RcloneApi:
|
|
|
133
135
|
)
|
|
134
136
|
|
|
135
137
|
try:
|
|
136
|
-
with urllib.request.urlopen(req, timeout=
|
|
138
|
+
with urllib.request.urlopen(req, timeout=TIMEOUT) as resp:
|
|
137
139
|
raw: bytes = resp.read()
|
|
138
140
|
response_json = json.loads(raw.decode("utf-8"))
|
|
139
141
|
|
|
@@ -141,6 +143,8 @@ class RcloneApi:
|
|
|
141
143
|
raw: bytes = exc.read()
|
|
142
144
|
response_json = json.loads(raw.decode("utf-8"))
|
|
143
145
|
raise RcloneProcessException.from_dict(response_json) from exc
|
|
146
|
+
except TimeoutError as exc:
|
|
147
|
+
raise RcloneConnectionException(f"Operation timed out after {TIMEOUT}s. To copy large files consider using _async methods.") from exc
|
|
144
148
|
except Exception as exc: # all other errors
|
|
145
149
|
raise RcloneConnectionException(f"Issue connecting to rclone RC server, error: {exc}") from exc
|
|
146
150
|
else:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rclone_bin_api-1.0.3 → rclone_bin_api-1.0.4}/src/rclone_bin_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|