completed lab4

This commit is contained in:
2026-11-06 17:03:03 +03:00
parent ec540a1a72
commit 6b42473aec
30 changed files with 1184 additions and 39 deletions
+3 -1
View File
@@ -122,7 +122,9 @@ class Client:
response = error
except (urllib.error.URLError,TimeoutError,OSError) as exc:
# Do not print URL query, headers, request body, or credentials.
raise Failure(method + ' ' + path.split('?')[0] + ': connection/TLS failure (' + type(exc).__name__ + ')') from None
reason=getattr(exc,'reason',None)
reason_type=type(reason).__name__ if reason is not None else type(exc).__name__
raise Failure(method + ' ' + path.split('?')[0] + ': connection/TLS failure (' + reason_type + ')') from None
with response:
status = response.code
rh = response.headers