From aa789334b12360071b7c0520208c6d00244fe994 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Sat, 19 Oct 2019 21:11:48 -0500 Subject: [PATCH] Added default arg to calendar_api --- gapi/calendar_api.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gapi/calendar_api.py b/gapi/calendar_api.py index 7a05542..f1722a9 100644 --- a/gapi/calendar_api.py +++ b/gapi/calendar_api.py @@ -1,3 +1,4 @@ +import os from dateutil import rrule, tz from oauth2client import tools from googleapiclient.errors import HttpError @@ -10,7 +11,7 @@ import datetime if __name__ == "__main__": from api import API else: - from gapi.api import API + from gapi.api import API, config flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args() APPLICATION_NAME = "Google Calendar API Python" @@ -45,8 +46,8 @@ class calendar_api(API): def __init__( self, app_name, - client_secret_file, - credentials_dir, + client_secret_file=os.path.join(config.state_dir, "client_secret.json"), + credentials_dir=config.state_dir, scopes="https://www.googleapis.com/auth/calendar", version="v3", ):