STINNER Victor <vstin...@python.org> added the comment:
On Linux, converting IsADirectoryError to ZoneInfoNotFoundError is easy. But on Windows, I don't think that converting any PermissionError into a ZoneInfoNotFoundError is a good idea. Maybe if PermissionError happens, we should check if the path is a directory. Pseudo-code: try: <open and read file> except OSError as exc: if os.path.isdir(zone_path): raise ZoneInfoNotFoundError else: raise ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41530> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com