From c5f7c7dd024eb0762e38f444075cdb5e29bc6aad Mon Sep 17 00:00:00 2001 From: Alex Zai Date: Sat, 23 Apr 2016 11:13:56 -0700 Subject: [PATCH] (feat) dynamically loads create options if signed in --- src/drive_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drive_api.py b/src/drive_api.py index 5c6cf66..4f83b62 100644 --- a/src/drive_api.py +++ b/src/drive_api.py @@ -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()): @@ -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')