From: Calin Crisan Date: Wed, 18 May 2016 20:29:14 +0000 (+0300) Subject: dropbox: fixed copy-pasted _refresh_credentials/_request_credentials X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=8f38d963ee0ad7ee77d9ee9838a588aad11becd1;p=motioneye-debian dropbox: fixed copy-pasted _refresh_credentials/_request_credentials issue --- diff --git a/motioneye/uploadservices.py b/motioneye/uploadservices.py index 3805023..1f268c4 100644 --- a/motioneye/uploadservices.py +++ b/motioneye/uploadservices.py @@ -504,9 +504,9 @@ class Dropbox(UploadService): if e.code == 401 and retry_auth: # unauthorized, access token may have expired try: self.debug('credentials have probably expired, refreshing them') - self._credentials = self._refresh_credentials(self._credentials['refresh_token']) + self._credentials = self._request_credentials(self._authorization_key) self.save() - + # retry the request with refreshed credentials self._request(url, body, headers, retry_auth=False)