From 3ce967c56d10adb3f763e70441424f11202591e9 Mon Sep 17 00:00:00 2001 From: atom-tr Date: Fri, 13 Oct 2023 15:19:37 +0700 Subject: [PATCH] switch to json load --- src/main.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.py b/src/main.py index 876cd92..2d05a10 100644 --- a/src/main.py +++ b/src/main.py @@ -6,6 +6,7 @@ from __future__ import print_function import os.path +import json from manager_environment import EnvironmentManager as ENV from google.auth.transport.requests import Request @@ -17,12 +18,10 @@ # If modifying these scopes, delete the file token.json. SCOPES = ['https://www.googleapis.com/auth/script.projects'] -MANIFEST = ''' -{ - "timeZone": "{}", +MANIFEST = { + "timeZone": f"{ENV.TIMEZONE}", "exceptionLogging": "CLOUD" } -'''.format(ENV.TIMEZONE).strip() def main(): """Calls the Apps Script API. @@ -51,7 +50,7 @@ def main(): 'files': [{ 'name': 'appsscript', 'type': 'JSON', - 'source': MANIFEST + 'source': json.dumps(MANIFEST) }] } # loop through gs files in webflow directory