anubhav77 commited on
Commit
e92cb36
·
1 Parent(s): 67ba71d
Files changed (1) hide show
  1. dropbox_handler.py +2 -0
dropbox_handler.py CHANGED
@@ -19,10 +19,12 @@ with dropbox.Dropbox(oauth2_access_token=TOKEN,app_key=APP_KEY,app_secret=APP_SE
19
  # Check that the access token is valid
20
  try:
21
  dbx.users_get_current_account()
 
22
  except AuthError:
23
  try:
24
  dbx.check_and_refresh_access_token()
25
  fbh.fb_update("d2_accesstoken",dbx._oauth2_access_token)
 
26
  except Exception:
27
  sys.exit("ERROR: Invalid access token; try re-generating an "
28
  "access token from the app console on the web.")
 
19
  # Check that the access token is valid
20
  try:
21
  dbx.users_get_current_account()
22
+ print("dropbox connection ok,",dbx._oauth2_access_token)
23
  except AuthError:
24
  try:
25
  dbx.check_and_refresh_access_token()
26
  fbh.fb_update("d2_accesstoken",dbx._oauth2_access_token)
27
+ print("dropbox connection refreshed and updated",dbx._oauth2_access_token)
28
  except Exception:
29
  sys.exit("ERROR: Invalid access token; try re-generating an "
30
  "access token from the app console on the web.")