From 1a5700e9a0bdc404d0d2a49898dba78d872b53e8 Mon Sep 17 00:00:00 2001 From: Raphael Maenle Date: Sat, 6 Jun 2020 20:01:38 +0200 Subject: [PATCH] minor bugfix when None value passed to function --- __init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/__init__.py b/__init__.py index c601100..c5bcbd2 100644 --- a/__init__.py +++ b/__init__.py @@ -99,6 +99,8 @@ def calendarCredentials(token = None): def updateCalendars(user, calendars, colors): + if user == None or calendars == None or colors == None: + return COLORS_FILE = os.path.join(os.path.dirname(__file__), 'colors.json') with open(COLORS_FILE) as f: colormap = json.load(f)