fix username display

This commit is contained in:
Martinez 2016-01-07 12:25:18 +01:00
parent 10388217e6
commit 3254adb8aa

View file

@ -47,10 +47,7 @@ MOUNT_IGNORE_DIR = ["/dev", "/proc", "/sys"]
GIT_BLACKLIST = ["/var/paludis/repositories"]
def get_username():
try:
return os.getlogin()
except FileNotFoundError:
return pwd.getpwuid(os.geteuid())[0]
pwd.getpwuid(os.geteuid())[0]
def style_color(fg):
return "\033[38;5;%dm" %(fg)