summarylogtreecommitdiffstats
path: root/client_secrets.patch
diff options
context:
space:
mode:
authorEthan Schoonover (altercation)2015-08-18 23:10:26 +0200
committerEthan Schoonover (altercation)2015-08-18 23:10:26 +0200
commitc2b41b4fe079e824d8b2562c162351ede41c2fb7 (patch)
treed4e73979380702ba2310b1b894e997bc5f5bb43e /client_secrets.patch
parent2bf1b94b936ac7beb7b2aa9f376be2abf5ecec0e (diff)
downloadaur-c2b41b4fe079e824d8b2562c162351ede41c2fb7.tar.gz
Modified patch to allow OATHFILE, CLIENTSECRETS, and GAMCACHE env vars
Diffstat (limited to 'client_secrets.patch')
-rw-r--r--client_secrets.patch36
1 files changed, 29 insertions, 7 deletions
diff --git a/client_secrets.patch b/client_secrets.patch
index c6c7139d7090..12d58c53c0a7 100644
--- a/client_secrets.patch
+++ b/client_secrets.patch
@@ -1,5 +1,5 @@
---- old-gam.py 2015-08-18 17:20:00.268784523 +0200
-+++ gam.py 2015-08-18 18:33:22.165903501 +0200
+--- old-gam.py 2015-08-18 23:04:39.852955746 +0200
++++ gam.py 2015-08-18 23:05:42.805013976 +0200
@@ -319,7 +319,7 @@
global customerId
oauth2file = getGamPath()+u'oauth2.txt'
@@ -18,7 +18,18 @@
except KeyError:
pass
storage = oauth2client.file.Storage(oauth2file)
-@@ -589,7 +589,7 @@
+@@ -543,6 +543,10 @@
+ cache = None
+ if not os.path.isfile(getGamPath()+u'nocache.txt'):
+ cache = u'%sgamcache' % getGamPath()
++ try:
++ cache = os.environ[u'GAMCACHE']
++ except KeyError:
++ pass
+ http = httplib2.Http(ca_certs=getGamPath()+u'cacert.pem', disable_ssl_certificate_validation=disable_ssl_certificate_validation, cache=cache)
+ if os.path.isfile(getGamPath()+u'debug.gam'):
+ httplib2.debuglevel = 4
+@@ -589,7 +593,7 @@
global extra_args
oauth2servicefile = getGamPath()+u'oauth2service'
try:
@@ -27,7 +38,18 @@
except KeyError:
pass
oauth2servicefilejson = u'%s.json' % oauth2servicefile
-@@ -5520,7 +5520,7 @@
+@@ -627,6 +631,10 @@
+ cache = None
+ if not os.path.isfile(getGamPath()+u'nocache.txt'):
+ cache = '%sgamcache' % getGamPath()
++ try:
++ cache = os.environ[u'GAMCACHE']
++ except KeyError:
++ pass
+ http = httplib2.Http(ca_certs=getGamPath()+u'cacert.pem', disable_ssl_certificate_validation=disable_ssl_certificate_validation, cache=cache)
+ if os.path.isfile(getGamPath()+u'debug.gam'):
+ httplib2.debuglevel = 4
+@@ -5520,7 +5528,7 @@
except IndexError:
oauth2file = getGamPath()+u'oauth2.txt'
try:
@@ -36,7 +58,7 @@
except KeyError:
pass
storage = oauth2client.file.Storage(oauth2file)
-@@ -7898,7 +7898,7 @@
+@@ -7898,7 +7906,7 @@
except IndexError:
oauth2file = getGamPath()+u'oauth2.txt'
try:
@@ -45,7 +67,7 @@
except KeyError:
pass
storage = oauth2client.file.Storage(oauth2file)
-@@ -7941,7 +7941,7 @@
+@@ -7941,7 +7949,7 @@
def doDeleteOAuth():
oauth2file = getGamPath()+u'oauth2.txt'
try:
@@ -54,7 +76,7 @@
except KeyError:
pass
storage = oauth2client.file.Storage(oauth2file)
-@@ -7981,6 +7981,10 @@
+@@ -7981,6 +7989,10 @@
def doRequestOAuth(incremental_auth=False):
CLIENT_SECRETS = getGamPath()+u'client_secrets.json'