Message11116

Author stefan.richthofer
Recipients jamesmudd, pguermo, stefan.richthofer, zyasoft
Date 2017-02-23.16:28:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487867325.36.0.317062500022.issue2534@psf.upfronthosting.co.za>
In-reply-to
Content
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."
History
Date User Action Args
2017-02-23 16:28:45stefan.richthofersetmessageid: <1487867325.36.0.317062500022.issue2534@psf.upfronthosting.co.za>
2017-02-23 16:28:45stefan.richthofersetrecipients: + stefan.richthofer, zyasoft, jamesmudd, pguermo
2017-02-23 16:28:45stefan.richthoferlinkissue2534 messages
2017-02-23 16:28:44stefan.richthofercreate