fix username display
This commit is contained in:
parent
10388217e6
commit
3254adb8aa
1 changed files with 1 additions and 4 deletions
|
@ -47,10 +47,7 @@ MOUNT_IGNORE_DIR = ["/dev", "/proc", "/sys"]
|
||||||
GIT_BLACKLIST = ["/var/paludis/repositories"]
|
GIT_BLACKLIST = ["/var/paludis/repositories"]
|
||||||
|
|
||||||
def get_username():
|
def get_username():
|
||||||
try:
|
pwd.getpwuid(os.geteuid())[0]
|
||||||
return os.getlogin()
|
|
||||||
except FileNotFoundError:
|
|
||||||
return pwd.getpwuid(os.geteuid())[0]
|
|
||||||
|
|
||||||
def style_color(fg):
|
def style_color(fg):
|
||||||
return "\033[38;5;%dm" %(fg)
|
return "\033[38;5;%dm" %(fg)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue