Message283821
Raising in case no valid path is passed seems fine to me. There are other cases where it fails:
python3 -c "import os; os.path.exists('\ud83d')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/genericpath.py", line 19, in exists
os.stat(path)
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud83d' in position 0: surrogates not allowed
LANG=C python3 -c "import os; os.path.exists('\xff')" ~
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/genericpath.py", line 19, in exists
os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character '\xff' in position 0: ordinal not in range(128) |
|
| Date |
User |
Action |
Args |
| 2016-12-22 08:54:01 | lazka | set | recipients:
+ lazka, Dolda2000 |
| 2016-12-22 08:54:01 | lazka | set | messageid: <1482396841.66.0.998983003518.issue29042@psf.upfronthosting.co.za> |
| 2016-12-22 08:54:01 | lazka | link | issue29042 messages |
| 2016-12-22 08:54:01 | lazka | create | |
|