New submission from Christoph Reiter: It returns True for drives which don't exist and raises for paths starting with drives which don't exist.
>>> os.path.exists("C:\\") True >>> os.path.ismount("C:\\") True >>> os.path.ismount("C:\\doesnotexist") False >>> os.path.exists("F:\\") False >>> os.path.ismount("F:\\") True >>> os.path.ismount("F:\\doesnotexist") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\lazka\AppData\Local\Programs\Python\Python35\lib\ntpath.py", line 290, in ismount return path.rstrip(seps) == _getvolumepathname(path).rstrip(seps) FileNotFoundError: [WinError 2] The system cannot find the file specified: 'F:\\doesnotexist' ---------- components: Windows messages: 282241 nosy: lazka, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.path.mount sometimes raises FileNotFoundError on Windows versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28859> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com