[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][glibc-team/tzdata][sid] d/t/debconf: Fix removing broken symlink



Title: GitLab

Benjamin Drung pushed to branch sid at GNU Libc Maintainers / tzdata

Commits:

  • 68c36fd6
    by Benjamin Drung at 2023-02-07T12:05:13+01:00
    d/t/debconf: Fix removing broken symlink
    
    If the path points to a symlink, `pathlib.Path.exists` returns whether
    the symlink points to an existing file or directory. So `exists` will
    return `False` for broken symlinks. The following `symlink_to` will fail
    then.
    
    So just try to remove the symlink and ignore `FileNotFoundError`.
    
    Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
    

1 changed file:


Reply to: