Skip to content

Commit

Permalink
Sort alphabetically if checking is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed Sep 18, 2024
1 parent 88ca641 commit 5de2b3f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions proxy_scraper_checker/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ def __attrs_post_init__(self) -> None:
msg = "geolocation can not be enabled if json output is disabled"
raise ValueError(msg)

if not self.check_website and self.sort_by_speed:
logger.warning(
"Proxy checking is disabled, so sorting by speed is not"
" possible. Alphabetical sorting will be used instead."
)
self.sort_by_speed = False

@check_website.validator
def _validate_check_website(
self,
Expand Down

0 comments on commit 5de2b3f

Please sign in to comment.