mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
diagnostics: Add DiagnosticCheck dataclass
- Set unique check_id for each diagnostic check. - Result is a string-based enumeration. The default value (NOT_DONE) can be used for diagnostic checks that have not been completed yet. - Result is StrEnum so that the return value of check_url can still be used directly as a diagnostic result. Closes: #2375 Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
19 files changed
+284
-183
No files matched your search
@@ -111,7 +111,8 @@ def diagnose_url_with_proxy():
|
||||
env = {'https_proxy': proxy}
|
||||
|
||||
result = diagnose_url(url, kind=address['kind'], env=env)
|
||||
result[0] = _('Access {url} with proxy {proxy} on tcp{kind}') \
|
||||
result.description = _(
|
||||
'Access {url} with proxy {proxy} on tcp{kind}') \
|
||||
.format(url=url, proxy=proxy, kind=address['kind'])
|
||||
results.append(result)
|
||||
|
||||
|
||||
Reference in new issue
Block a user