* common.py: Use os.path.expanduser() instead of os.environ.

This commit is contained in:
Jonathan Patrick Davies 2008-08-12 18:43:21 +01:00
parent 381a361c83
commit a37b0de322
2 changed files with 4 additions and 3 deletions

View File

@ -68,7 +68,7 @@ def prepareLaunchpadCookie():
ftstr = ["FALSE", "TRUE"]
# This shall be where our new cookie file lives - at ~/.lpcookie.txt
newLPCookieLocation = "%s/.lpcookie.txt" % os.environ.get('HOME')
newLPCookieLocation = os.path.expanduser("~/lpcookie.txt")
# Open file for writing.
newLPCookie = open(newLPCookieLocation, 'w')
@ -95,7 +95,7 @@ def prepareLaunchpadCookie():
# only by owner.
os.chmod(newLPCookieLocation, 0600)
launchpad_cookiefile = "%s/.lpcookie.txt" % os.environ.get('HOME')
launchpad_cookiefile = newLPCookieLocation
# Return the Launchpad cookie.
return launchpad_cookiefile

3
debian/changelog vendored
View File

@ -1,6 +1,7 @@
ubuntu-dev-tools (0.39ubuntu1) intrepid; urgency=low
* Changes go here.
[ Jonathan Patrick Davies ]
* common.py: Use os.path.expanduser() instead of os.environ.
-- Jonathan Patrick Davies <jpds@ubuntu.com> Tue, 12 Aug 2008 18:32:05 +0100