[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-05-23 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@steve.dower, please review the changes when you get a chance.  Thanks!

--
nosy: +cheryl.sabella

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-04-02 Thread Ankesh Saha


Ankesh Saha  added the comment:

s I have tried to workout a solution for the problem. Below is my observation 
and possible solution.

os.path.ismount("F:\\doesnotexist")

Exception occurs for the above line if the system fails to find both drive and 
the path that follows it.

A 'FileNotFoundError' exception is thrown. If we can handle this exception and 
return false for method ismount(), then problem can be resolved.

I changed the existing code ismount method and it is working.
Existing code=>
if _getvolumepathname:
return path.rstrip(seps) == _getvolumepathname(path).rstrip(seps)
else:
return False

Changed Code=>
if _getvolumepathname:
try:
return path.rstrip(seps) == _getvolumepathname(path).rstrip(seps)
except FileNotFoundError:
return False

Please check, if this solution is correct.

--
nosy: +ankeshsaha

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-03-27 Thread Steve Dower


Steve Dower  added the comment:

Reminding us on here is helpful (for me, anyway).

I just left a couple of suggestions to make sure we handle all the cases.

It's important when you change or add tests that you make sure the test fails 
without your fix - otherwise it might not be testing the fix!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-03-26 Thread Zhu Sheng Li


Zhu Sheng Li  added the comment:

I submitted a PR and get reviewed by @lazka. Is there anything I should do for 
pushing it to next step?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-03-22 Thread 朱聖黎

Change by 朱聖黎 :


--
keywords: +patch
nosy: +akarei
nosy_count: 10.0 -> 11.0
pull_requests: +18470
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/19109

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-03-17 Thread Nishant Misra


Nishant Misra  added the comment:

Yes Lahfa Samy, you can take it up. I did not work on the issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-03-17 Thread Lahfa Samy


Lahfa Samy  added the comment:

Nishant Misra are you still working on this issue, if not could I take it from 
now on, as my first issue and contribution to Python?

--
nosy: +AkechiShiro

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-02-18 Thread Steve Dower


Steve Dower  added the comment:

> I am going to think maybe it was the "os.path.ismount" command that is 
> causing the issue. Does the file exist?

If the file does not exist, it is definitely not a mount point. So the function 
should return False instead of raising an error.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-02-15 Thread szb512


szb512  added the comment:

I am going to think maybe it was the "os.path.ismount" command that is causing 
the issue. Does the file exist?

--
nosy: +sdcards

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-02-08 Thread Nishant Misra


Nishant Misra  added the comment:

I would like to take this issue as my first issue to start contributing to 
Python development.

--
nosy: +scic0

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-02-05 Thread Dan Arad


Change by Dan Arad :


--
nosy: +Dan Arad

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2019-12-02 Thread Steve Dower


Steve Dower  added the comment:

Traditionally we handle exceptions in os.path.is* functions and return False.

--
keywords: +easy, newcomer friendly
stage:  -> test needed
type:  -> behavior
versions: +Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2019-03-20 Thread Christoph Reiter


Change by Christoph Reiter :


--
versions: +Python 3.7 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2016-12-02 Thread Martin Panter

Changes by Martin Panter :


--
title: os.path.mount sometimes raises FileNotFoundError on Windows -> 
os.path.ismount sometimes raises FileNotFoundError on Windows

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com