Message11116
Your're right: I overlooked that @Hide also rules out PosixImpl.JAVA.
Regarding None I'm not sure how that benefits the user: He/she can as well catch the exception. IMO it would be more convenient to let at least the exception type match that of CPyton so the except-statement can be easily written in a portable way.
So given that CPython happens to raise OSError we should do so as well. I'd suggest to let the error message point user directly to the better workaround, e.g. something like:
"getlogin failed. It is recommended to rather use os.getenv('LOGNAME')/os.getenv('USER') on posix or os.getenv('USERNAME') on Windows." |
|
Date |
User |
Action |
Args |
2017-02-23 16:28:45 | stefan.richthofer | set | messageid: <1487867325.36.0.317062500022.issue2534@psf.upfronthosting.co.za> |
2017-02-23 16:28:45 | stefan.richthofer | set | recipients:
+ stefan.richthofer, zyasoft, jamesmudd, pguermo |
2017-02-23 16:28:45 | stefan.richthofer | link | issue2534 messages |
2017-02-23 16:28:44 | stefan.richthofer | create | |
|