5d1cff2 os.getlogin() raises an exception if the current session cannot be found in the /var/run/utmp file. This can happen if the user is not running from a login shell, e.g. from tmux.

1 file Authored by Shawn Lower 12 years ago, Committed by pingou 12 years ago,
    os.getlogin() raises an exception if the current session cannot be found in the /var/run/utmp file. This can happen if the user is not running from a login shell, e.g. from tmux.
    
    This change tries os.getlogin() but falls back to using either the $LOGNAME
    environment variable, or pwd.getpwduid(os.getuid())[0]
    
        
file modified
+11 -1