We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3de0c13 + 6067699 commit 5ef3ff8Copy full SHA for 5ef3ff8
1 file changed
mathics/builtin/system.py
@@ -408,10 +408,11 @@ class UserName(Predefined):
408
409
def evaluate(self, evaluation) -> String:
410
try:
411
- return String(os.getlogin())
+ user = os.getlogin()
412
except:
413
import pwd
414
- return String(pwd.getpwuid(os.getuid())[0])
+ user = pwd.getpwuid(os.getuid())[0]
415
+ return String(user)
416
417
418
class Version(Predefined):
0 commit comments