Skip to content

Commit

Permalink
Update dropbox.py for compatibility with Dropbox SDK v11.X.X
Browse files Browse the repository at this point in the history
`dropbox.dropbox` has been renamed to `dropbox.dropbox_client`

https://github.com/dropbox/dropbox-sdk-python/blob/main/UPGRADING.md
  • Loading branch information
smrohrer authored Oct 22, 2023
1 parent d86b97e commit ee7f92f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions luigi/contrib/dropbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
logger = logging.getLogger('luigi-interface')

try:
import dropbox.dropbox
import dropbox.dropbox_client

Check warning on line 33 in luigi/contrib/dropbox.py

View check run for this annotation

Codecov / codecov/patch

luigi/contrib/dropbox.py#L33

Added line #L33 was not covered by tests
import dropbox.exceptions
import dropbox.files
except ImportError:
Expand Down Expand Up @@ -76,7 +76,7 @@ def __init__(self, token, user_agent="Luigi"):
raise ValueError("The token parameter must contain a valid Dropbox Oauth2 Token")

try:
conn = dropbox.dropbox.Dropbox(oauth2_access_token=token, user_agent=user_agent)
conn = dropbox.dropbox_client.Dropbox(oauth2_access_token=token, user_agent=user_agent)

Check warning on line 79 in luigi/contrib/dropbox.py

View check run for this annotation

Codecov / codecov/patch

luigi/contrib/dropbox.py#L79

Added line #L79 was not covered by tests
except Exception as e:
raise Exception("Cannot connect to Dropbox. Check your Internet connection and the token. \n" + repr(e))

Expand Down

0 comments on commit ee7f92f

Please sign in to comment.