Use os.expanduser and os.path.join instead of getuid, getpwuid and +

This commit is contained in:
Thomas Hurst 2008-04-16 21:51:14 +01:00
parent 488099c948
commit 484b403cad

View File

@ -129,7 +129,7 @@ class TerminatorConfValuestoreRC (TerminatorConfValuestore):
# that can be re-used when rc changes.
def __init__ (self):
self.type = "RCFile"
self.rcfilename = pwd.getpwuid (os.getuid ())[5] + "/.terminatorrc"
self.rcfilename = os.path.join(os.path.expanduser("~"), ".terminatorrc")
if os.path.exists (self.rcfilename):
rcfile = open (self.rcfilename)
rc = rcfile.readlines ()