Conditions | 1 |
Total Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | import http.client |
||
4 | def __is_online(domain, sub_path, response_status, response_reason): |
||
5 | conn = http.client.HTTPSConnection(domain, timeout=1) |
||
6 | conn.request("HEAD", sub_path) |
||
7 | response = conn.getresponse() |
||
8 | conn.close() |
||
9 | |||
10 | return (response.status == response_status) and (response.reason == response_reason) |
||
11 | |||
32 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.