summarylogtreecommitdiffstats
path: root/client_secrets.patch
blob: 12d58c53c0a78d6e07d379b943ba8fa7fc2dec73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
--- 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'
   try:
-    oauth2file = getGamPath()+os.environ[u'OAUTHFILE']
+    oauth2file = os.environ[u'OAUTHFILE']
   except KeyError:
     pass
   storage = oauth2client.file.Storage(oauth2file)
@@ -526,7 +526,7 @@
   global domain, customerId, extra_args
   oauth2file = getGamPath()+u'oauth2.txt'
   try:
-    oauth2file = getGamPath()+os.environ[u'OAUTHFILE']
+    oauth2file = os.environ[u'OAUTHFILE']
   except KeyError:
     pass
   storage = oauth2client.file.Storage(oauth2file)
@@ -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:
-    oauth2servicefile = getGamPath()+os.environ[u'OAUTHSERVICEFILE']
+    oauth2servicefile = os.environ[u'OAUTHSERVICEFILE']
   except KeyError:
     pass
   oauth2servicefilejson = u'%s.json' % oauth2servicefile
@@ -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:
-        oauth2file = getGamPath()+os.environ[u'OAUTHFILE']
+        oauth2file = os.environ[u'OAUTHFILE']
       except KeyError:
         pass
       storage = oauth2client.file.Storage(oauth2file)
@@ -7898,7 +7906,7 @@
   except IndexError:
     oauth2file = getGamPath()+u'oauth2.txt'
     try:
-      oauth2file = getGamPath()+os.environ[u'OAUTHFILE']
+      oauth2file = os.environ[u'OAUTHFILE']
     except KeyError:
       pass
     storage = oauth2client.file.Storage(oauth2file)
@@ -7941,7 +7949,7 @@
 def doDeleteOAuth():
   oauth2file = getGamPath()+u'oauth2.txt'
   try:
-    oauth2file = getGamPath()+os.environ[u'OAUTHFILE']
+    oauth2file = os.environ[u'OAUTHFILE']
   except KeyError:
     pass
   storage = oauth2client.file.Storage(oauth2file)
@@ -7981,6 +7989,10 @@
 
 def doRequestOAuth(incremental_auth=False):
   CLIENT_SECRETS = getGamPath()+u'client_secrets.json'
+  try:
+    CLIENT_SECRETS = os.environ[u'CLIENTSECRETS']
+  except KeyError:
+    pass
   MISSING_CLIENT_SECRETS_MESSAGE = u"""
 WARNING: Please configure OAuth 2.0