Commit 8235f668 authored by nojhan's avatar nojhan
Browse files

Fallback mode for user display

If the OS does not support logged user, use the current one.
Thus, he LP_USER.ALWAYS just show/hide the user.
parent 36f07ed3
......@@ -80,8 +80,14 @@ class _lp_user(_lp_):
cur = getpass.getuser()
# logged user
# WARNING: Unix only
log = os.getlogin()
try:
# WARNING: Unix only
log = os.getlogin()
except:
# if the os does not support logged user
# use the current one
# thus, the ALWAYS option just show/hide the user
log = cur
if cur != 'root':
if cur != log:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment