diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-23 15:38:29 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-23 15:38:29 +0000 |
commit | 7de8b1873902cb8857a27ae6b0b6d5b5291d62b0 (patch) | |
tree | 78c19a6307e0bee6eb8a2cda8fc99b6bcc373072 /remoting/tools/gettoken.py | |
parent | e5366896e9ccb3dd17c590d115bd999e987a33af (diff) | |
download | chromium_src-7de8b1873902cb8857a27ae6b0b6d5b5291d62b0.zip chromium_src-7de8b1873902cb8857a27ae6b0b6d5b5291d62b0.tar.gz chromium_src-7de8b1873902cb8857a27ae6b0b6d5b5291d62b0.tar.bz2 |
Get scripts working independent of where they are run.
Also store script data in home directory.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/2832019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/tools/gettoken.py')
-rwxr-xr-x | remoting/tools/gettoken.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/remoting/tools/gettoken.py b/remoting/tools/gettoken.py index 3a61927..a4024d7 100755 --- a/remoting/tools/gettoken.py +++ b/remoting/tools/gettoken.py @@ -13,7 +13,7 @@ import urllib import gaia_auth -auth_filename = '.chromotingAuthToken' +auth_filepath = os.path.join(os.getenv('HOME'), '.chromotingAuthToken') print "Email:", email = raw_input() @@ -25,7 +25,7 @@ auth_token = authenticator.authenticate(email, passwd) # Set permission mask for created file. os.umask(0066) -auth_file = open(auth_filename, 'w') +auth_file = open(auth_filepath, 'w') auth_file.write(email) auth_file.write('\n') auth_file.write(auth_token) @@ -35,4 +35,4 @@ print print 'Auth token:' print print auth_token -print '...saved in', auth_filename +print '...saved in', auth_filepath |