userscripts: Properly avoid tldextract warning
The previous fix in 3dc212a815 was insufficient,
as the inner `getattr(extract_result, "registered_domain")` was always evaluated
first (thus triggering the deprecation warning again).
We also cannot do:
getattr(extract_result, "top_domain_under_public_suffix", None) or extract_result.registered_domain
as `""` is a valid value for it.
This commit is contained in:
parent
eade090648
commit
37e1e50789
|
|
@ -19,6 +19,14 @@ breaking changes (such as renamed commands) can happen in minor releases.
|
|||
v3.5.1 (unreleased)
|
||||
-------------------
|
||||
|
||||
Fixed
|
||||
~~~~~
|
||||
|
||||
- Resolved issues in userscripts:
|
||||
* `qute-bitwarden`, `-lastpass` and `-pass` now properly avoid a
|
||||
`DeprecationWarning` from the upcoming 6.0 release of `tldextract`.
|
||||
The previous fix in v3.5.1 was insufficient.
|
||||
|
||||
[[v3.5.0]]
|
||||
v3.5.0 (2025-04-12)
|
||||
-------------------
|
||||
|
|
|
|||
|
|
@ -208,10 +208,10 @@ def main(arguments):
|
|||
None,
|
||||
[
|
||||
extract_result.fqdn,
|
||||
getattr(
|
||||
extract_result,
|
||||
"top_domain_under_public_suffix",
|
||||
getattr(extract_result, "registered_domain"),
|
||||
(
|
||||
extract_result.top_domain_under_public_suffix
|
||||
if hasattr(extract_result, "top_domain_under_public_suffix")
|
||||
else extract_result.registered_domain
|
||||
),
|
||||
extract_result.subdomain + "." + extract_result.domain,
|
||||
extract_result.domain,
|
||||
|
|
|
|||
|
|
@ -121,10 +121,10 @@ def main(arguments):
|
|||
None,
|
||||
[
|
||||
extract_result.fqdn,
|
||||
getattr(
|
||||
extract_result,
|
||||
"top_domain_under_public_suffix",
|
||||
getattr(extract_result, "registered_domain"),
|
||||
(
|
||||
extract_result.top_domain_under_public_suffix
|
||||
if hasattr(extract_result, "top_domain_under_public_suffix")
|
||||
else extract_result.registered_domain
|
||||
),
|
||||
extract_result.subdomain + extract_result.domain,
|
||||
extract_result.domain,
|
||||
|
|
|
|||
|
|
@ -247,10 +247,10 @@ def main(arguments):
|
|||
None,
|
||||
[
|
||||
extract_result.fqdn,
|
||||
getattr(
|
||||
extract_result,
|
||||
"top_domain_under_public_suffix",
|
||||
getattr(extract_result, "registered_domain"),
|
||||
(
|
||||
extract_result.top_domain_under_public_suffix
|
||||
if hasattr(extract_result, "top_domain_under_public_suffix")
|
||||
else extract_result.registered_domain
|
||||
),
|
||||
extract_result.ipv4,
|
||||
private_domain,
|
||||
|
|
|
|||
Loading…
Reference in New Issue