Skip to content

Commit

Permalink
(feat) dynamically loads create options if signed in
Browse files Browse the repository at this point in the history
  • Loading branch information
azai91 committed Apr 23, 2016
1 parent b3e8b88 commit c5f7c7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/drive_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ def show_settings(cls, user_input):
cls.show_set_cache_length(user_input[17:])

# if account is already set
if wf.get_password('drive_access_token'):
try:
wf.get_password('drive_access_token')
if 'create google doc'.startswith(user_input.lower()):
cls.show_create_setting('DOC')
if 'create google sheet'.startswith(user_input.lower()):
Expand All @@ -167,6 +168,7 @@ def show_settings(cls, user_input):
cls.show_create_setting('SLIDE')
if 'create google form'.startswith(user_input.lower()):
cls.show_create_setting('FORM')
except: pass

if len(wf._items) == 0:
cls.show_error('InvalidOption')
Expand Down

0 comments on commit c5f7c7d

Please sign in to comment.