Message397629
Why do you think OSError fits here? Since objects provided on the command line by definition cannot have source code files, the problem isn't that the file is missing or inaccessible. Rather, the value provided to getsource() is wrong. So, in my view, this should rather be ValueError.
Moreover, checking for __main__ is insufficient as there are __main__.py modules after all in many packages. |
|
Date |
User |
Action |
Args |
2021-07-16 13:54:29 | lukasz.langa | set | recipients:
+ lukasz.langa, aroberge, andrei.avk |
2021-07-16 13:54:29 | lukasz.langa | set | messageid: <1626443669.33.0.530166307988.issue44648@roundup.psfhosted.org> |
2021-07-16 13:54:29 | lukasz.langa | link | issue44648 messages |
2021-07-16 13:54:29 | lukasz.langa | create | |
|