Use os.expanduser and os.path.join instead of getuid, getpwuid and +
This commit is contained in:
parent
488099c948
commit
484b403cad
|
@ -129,7 +129,7 @@ class TerminatorConfValuestoreRC (TerminatorConfValuestore):
|
||||||
# that can be re-used when rc changes.
|
# that can be re-used when rc changes.
|
||||||
def __init__ (self):
|
def __init__ (self):
|
||||||
self.type = "RCFile"
|
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):
|
if os.path.exists (self.rcfilename):
|
||||||
rcfile = open (self.rcfilename)
|
rcfile = open (self.rcfilename)
|
||||||
rc = rcfile.readlines ()
|
rc = rcfile.readlines ()
|
||||||
|
|
Loading…
Reference in New Issue