Skip to content

Commit 12f2a65

Browse files
committed
Version [1.0.3]
1 parent 81ba5eb commit 12f2a65

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88

99

10+
## Version [1.0.3] - 2024-16-07
11+
12+
### Fixed
13+
14+
- Rclone: Fixed WebDAV URL check for Zurg startup processes when Zurg user and password are set in config.yml
15+
16+
1017
## Version [1.0.2] - 2024-16-07
1118

1219
### Fixed

main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
def main():
1010
logger = get_logger()
1111

12-
version = '1.0.2'
12+
version = '1.0.3'
1313

1414
ascii_art = f'''
1515

rclone/rclone.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,18 @@ def obscure_password(password):
2424

2525
def wait_for_url(url, endpoint="/dav/", timeout=600):
2626
start_time = time.time()
27-
logger.info(f"Waiting to start the rclone process until the Zurg WebDAV {url}{endpoint} is accessible.")
27+
logger.info(f"Waiting to start the rclone process until the Zurg WebDAV {url}{endpoint} is accessible.")
28+
auth = None
29+
if 'ZURGUSER' in globals() and 'ZURGPASS' in globals() and ZURGUSER and ZURGPASS:
30+
auth = (ZURGUSER, ZURGPASS)
31+
2832
while time.time() - start_time < timeout:
2933
try:
30-
response = requests.get(f"{url}{endpoint}")
34+
if auth:
35+
response = requests.get(f"{url}{endpoint}", auth=auth)
36+
else:
37+
response = requests.get(f"{url}{endpoint}")
38+
3139
if response.status_code == 207:
3240
logger.debug(f"Zurg WebDAV {url}{endpoint} is accessible.")
3341
return True
@@ -36,6 +44,7 @@ def wait_for_url(url, endpoint="/dav/", timeout=600):
3644
except requests.ConnectionError as e:
3745
logger.debug(f"Connection error while waiting for the Zurg WebDAV {url}{endpoint} to be accessible: {e}")
3846
time.sleep(5)
47+
3948
logger.error(f"Timeout: Zurg WebDAV {url}{endpoint} is not accessible after {timeout} seconds.")
4049
return False
4150

0 commit comments

Comments
 (0)