remove prints, fix trailing slash difference

This commit is contained in:
foamyguy 2023-11-21 18:04:21 -06:00
parent c1af505510
commit 1b2e115155

View file

@ -442,9 +442,7 @@ class WebBackend:
auth = HTTPBasicAuth("", url.password)
# Create the top level directory.
print(f'target: {target + "/"}')
r = requests.put(target + "/", auth=auth)
print(f"status: {r.status_code}")
r = requests.put(target + ("/" if not target.endswith("/") else ""), auth=auth)
r.raise_for_status()
# Traverse the directory structure and create the directories/files.
@ -744,7 +742,6 @@ class WebBackend:
"""
Update the module using web workflow.
"""
print(module.bundle_path)
if module.file:
# Copy the file (will overwrite).
self.install_file_http(module.bundle_path, module.path)
@ -752,11 +749,8 @@ class WebBackend:
# Delete the directory (recursive) first.
url = urlparse(module.path)
auth = HTTPBasicAuth("", url.password)
r = requests.delete(module.path, auth=auth)
r.raise_for_status()
print(module.path)
self.install_dir_http(module.bundle_path, module.path)