Skip to content

Commit

Permalink
it's now clear if a user cancelled an account auth
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonstreete committed Dec 16, 2017
1 parent 3f095d7 commit 6f6b7ec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cfs_manager/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def dbox_setup(config):
webbrowser.open(authorize_url)
auth_code = input("Enter the authorization code here: ").strip().strip('"').strip("'").strip()
config.write('Dropbox ::: '+auth_code+'\n')
else:
print("Dropbox setup cancelled")

def gdrive_setup(config):
print("""
Expand All @@ -59,6 +61,8 @@ def gdrive_setup(config):
gauth.LocalWebserverAuth()
gauth.SaveCredentialsFile("gdrive_credentials.txt")
config.write('Google Drive\n')
else:
print("Google Drive setup cancelled")

def _box_setup(config):
print("""
Expand All @@ -75,6 +79,8 @@ def _box_setup(config):
csrf_token, auth_code = split_tokens()
access_token, refresh_token = oauth.authenticate(auth_code)
config.write('Box (no drop) ::: '+ access_token +'<:>'+ refresh_token +'\n')
else:
print("Box setup cancelled")

def setup_switch(fs, config):
if fs == 'pCloud':
Expand Down

0 comments on commit 6f6b7ec

Please sign in to comment.