Message295826
On Unix, you can simply check the errno value:
>>> fn = "x" * 9999999
>>> try: open(fn, "r")
... except OSError as e: exc = e
...
>>> exc.errno
36
>>> exc.errno == errno.ENAMETOOLONG
True
I don't know about Windows. |
|
Date |
User |
Action |
Args |
2017-06-12 20:54:34 | pitrou | set | recipients:
+ pitrou, r.david.murray, Max Staff |
2017-06-12 20:54:34 | pitrou | set | messageid: <1497300874.72.0.735910612861.issue30641@psf.upfronthosting.co.za> |
2017-06-12 20:54:34 | pitrou | link | issue30641 messages |
2017-06-12 20:54:34 | pitrou | create | |
|