Skip to content

Commit

Permalink
Added protection to settings stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jeeftor committed Sep 18, 2016
1 parent bb45b0f commit 4386415
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
9 changes: 6 additions & 3 deletions GoogleInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,12 @@ def get_events_for_enabled_calendars(self,start,stop):
if 'calendar' in key:
enabled_cal_count += 1

enabled,color = self.wf.settings.get(key).get('value').split('\t')
# enabled, color = self.wf.settings.get(key).get('value')

try:
enabled,color = self.wf.settings.get(key).get('value').split('\t')
except:
enabled = self.wf.settings.get(key).get('value')
color = '1'

id = key.split(':')[1]

if enabled:
Expand Down
14 changes: 9 additions & 5 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@
</dict>
</array>
<key>361EEA91-97CF-4908-8628-5F29198F42E6</key>
<array/>
<array>
</array>
<key>3F81D499-33A5-44E8-8D22-F6309229F43B</key>
<array/>
<array>
</array>
<key>41AF5BED-C2EE-4FDC-B9DF-AFDEB347F6A8</key>
<array>
<dict>
Expand All @@ -91,7 +93,8 @@
</dict>
</array>
<key>5396CADE-8847-4968-9A2F-051C2730315E</key>
<array/>
<array>
</array>
<key>629EE274-2500-46EC-8DA5-35CD866A56C9</key>
<array>
<dict>
Expand Down Expand Up @@ -210,7 +213,8 @@
</dict>
</array>
<key>B95A7CF4-4AF9-4388-8B53-E8CB6F3350FC</key>
<array/>
<array>
</array>
<key>BB49C951-D08C-4C86-88D1-E55D150207DD</key>
<array>
<dict>
Expand Down Expand Up @@ -1270,7 +1274,7 @@ It "may" be stuck on East Coast time for the time being</string>
</dict>
</dict>
<key>version</key>
<string>4.0.1</string>
<string>4.1</string>
<key>webaddress</key>
<string>https://github.com/jeeftor/alfredToday</string>
</dict>
Expand Down

0 comments on commit 4386415

Please sign in to comment.