Skip to content

Commit

Permalink
[dropbox] ignore ApiError exception in url() (#1158)
Browse files Browse the repository at this point in the history
  • Loading branch information
begoon authored Jul 20, 2022
1 parent 0c5638b commit 7dd36fb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions storages/backends/dropbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ def accessed_time(self, name):
return metadata.client_modified

def url(self, name):
media = self.client.files_get_temporary_link(self._full_path(name))
return media.link
try:
media = self.client.files_get_temporary_link(self._full_path(name))
return media.link
except ApiError:
return None

def _open(self, name, mode='rb'):
remote_file = DropBoxFile(self._full_path(name), self)
Expand Down

0 comments on commit 7dd36fb

Please sign in to comment.