Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid crashing on importing localtime when TZ is malformed #1100

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Commits on Jul 18, 2024

  1. Avoid crashing on importing babel.localtime when TZ envvar is malfo…

    …rmed
    
    When `pytz` is _not_ installed, importing `babel.localtime` could fail
    (repeatedly) when the `TZ` environment variable is malformed enough to be
    caught by `_validate_tzfile_path`, which might throw a certain `ValueError`.
    
    (When `pytz` is installed, it would raise an `UnknownTimeZoneError` we
    already catch and ignore for the same sort of input.)
    
    Fixes #1092
    akx committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    ff4c01c View commit details
    Browse the repository at this point in the history