• Vincent Pelletier's avatar
    caucase.utils: Tolerate broken symlinks · a5306278
    Vincent Pelletier authored
    Otherwise, this causes an IOError to be raised in _getPEMTypeDict.
    So move file existence check inside the loop. Also rely on isdir returning
    False on non-existent inputs.
    This may for example happen if openssl-rehash is used on these directories:
    caucase-updater may delete an expired CA, breaking its symlink, triggering
    this bug and crashing caucase-updater.
    a5306278
test.py 120 KB