rk68 commited on
Commit
dc92394
·
verified ·
1 Parent(s): ab7968f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -44,7 +44,7 @@ creds_dict = {
44
  "type": os.getenv("type"),
45
  "project_id": os.getenv("project_id"),
46
  "private_key_id": os.getenv("private_key_id"),
47
- "private_key": os.getenv("private_key").replace('\\n', '\n'),
48
  "client_email": os.getenv("client_email"),
49
  "client_id": os.getenv("client_id"),
50
  "auth_uri": os.getenv("auth_uri"),
@@ -52,8 +52,6 @@ creds_dict = {
52
  "auth_provider_x509_cert_url": os.getenv("auth_provider_x509_cert_url"),
53
  "client_x509_cert_url": os.getenv("client_x509_cert_url")
54
  }
55
-
56
- creds_dict = json.loads(creds_dict)
57
  creds_dict['private_key'] = sa_creds['private_key'].replace('\\n', '\n')
58
  creds = ServiceAccountCredentials.from_json_keyfile_dict(creds_dict, scope)
59
  client = gspread.authorize(creds)
 
44
  "type": os.getenv("type"),
45
  "project_id": os.getenv("project_id"),
46
  "private_key_id": os.getenv("private_key_id"),
47
+ "private_key": os.getenv("private_key"),
48
  "client_email": os.getenv("client_email"),
49
  "client_id": os.getenv("client_id"),
50
  "auth_uri": os.getenv("auth_uri"),
 
52
  "auth_provider_x509_cert_url": os.getenv("auth_provider_x509_cert_url"),
53
  "client_x509_cert_url": os.getenv("client_x509_cert_url")
54
  }
 
 
55
  creds_dict['private_key'] = sa_creds['private_key'].replace('\\n', '\n')
56
  creds = ServiceAccountCredentials.from_json_keyfile_dict(creds_dict, scope)
57
  client = gspread.authorize(creds)