Message311607
| Author |
Phaqui |
| Recipients |
Phaqui, gregory.p.smith, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware |
| Date |
2018年02月04日.16:56:44 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1517763405.02.0.467229070634.issue32764@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This is strange, because _execute_child calls os.fsdecode with `args` as the argument, which may be a list. os.fsdecode calls fspath. Now, the python docstring of _fspath, as defined in Lib/os.py on line 1031, clearly states that it will raise a TypeError if the argument is not of type bytes, str or is a os.PathLike object, and that's probably why I wrote the initial code the way I did (catching TypeError from os.fsdecode).
Doesn't the try-except block actually catch this TypeError? I don't understand off the top of my head why my code doesn't catch this exception.. |
|